class Jobly::Commands::ConfigCmd
Public Instance Methods
run()
click to toggle source
# File lib/jobly/commands/config.rb, line 10 def run line "custom config file", short_config_path, !Jobly.custom_config? Jobly.options.each do |key, value| next unless value if key.to_s.end_with? '_path' line key, value, !Dir.exist?(value) else line key, value end end end
Private Instance Methods
line(key, value, attention=false)
click to toggle source
# File lib/jobly/commands/config.rb, line 28 def line(key, value, attention=false) color = attention ? '!txtred!' : '!txtgrn!' say "#{key.to_s.rjust 20} #{color}#{value.to_s.strip}" end
short_config_path()
click to toggle source
# File lib/jobly/commands/config.rb, line 24 def short_config_path Jobly.config_file.sub "#{Dir.pwd}/", '' end