Class: Berta::CLI
- Inherits:
-
Thor
- Object
- Thor
- Berta::CLI
- Defined in:
- lib/berta/cli.rb
Overview
CLI for berta
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.safe_fetch(keys) ⇒ Object
8 9 10 11 12 13 14 15 |
# File 'lib/berta/cli.rb', line 8 def self.safe_fetch(keys) current = Berta::Settings keys.each do |key| current = current[key] break unless current end current end |
Instance Method Details
#cleanup ⇒ Object
69 70 71 72 73 74 |
# File 'lib/berta/cli.rb', line 69 def cleanup initialize_configuration() initialize_logger() initialize_email Berta::CommandExecutor.new.cleanup end |
#config ⇒ Object
82 83 84 85 |
# File 'lib/berta/cli.rb', line 82 def config initialize_configuration() Berta::Settings.each { |key, val| $stdout.puts "#{key}\t=\t#{val}" } end |
#version ⇒ Object
77 78 79 |
# File 'lib/berta/cli.rb', line 77 def version $stdout.puts Berta::VERSION end |