class Bard::CLI
Public Class Methods
Source
# File lib/bard/cli.rb, line 41 def self.exit_on_failure? = true no_commands do def run!(...) Bard::Command.run!(...) rescue Bard::Command::Error => e puts red("!!! ") + "Running command failed: #{yellow(e.message)}" exit 1 end def config @config ||= Bard::Config.new(project_name, path: "bard.rb") end def project_name @project_name ||= File.expand_path(".").split("/").last end end end
Public Instance Methods
Source
# File lib/bard/cli.rb, line 51 def config @config ||= Bard::Config.new(project_name, path: "bard.rb") end
Source
# File lib/bard/cli.rb, line 55 def project_name @project_name ||= File.expand_path(".").split("/").last end
Source
# File lib/bard/cli.rb, line 44 def run!(...) Bard::Command.run!(...) rescue Bard::Command::Error => e puts red("!!! ") + "Running command failed: #{yellow(e.message)}" exit 1 end