Class: ConfigKit::Cli::Get
- Defined in:
- lib/config_kit/cli/commands/get.rb
Instance Attribute Summary
Attributes inherited from Command
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(args) ⇒ Get
constructor
A new instance of Get.
- #run ⇒ Object
Methods inherited from Command
Constructor Details
#initialize(args) ⇒ Get
Returns a new instance of Get.
5 6 7 8 9 |
# File 'lib/config_kit/cli/commands/get.rb', line 5 def initialize(args) @app = 'all' @output = nil super(args) end |
Class Method Details
.command ⇒ Object
3 |
# File 'lib/config_kit/cli/commands/get.rb', line 3 def self.command; "get"; end |
Instance Method Details
#run ⇒ Object
11 12 13 14 15 16 17 18 19 20 21 22 |
# File 'lib/config_kit/cli/commands/get.rb', line 11 def run begin @output = ConfigKit::Manager.get(@app) pp @output rescue ConfigKit::Cli::Command::CommandFailure raise rescue => e ConfigKit.logger.error "Unexpected error attempting to get config data #{@uri} in env #{@env} for #{@app.nil? ? 'all' : @app}" ConfigKit.logger.debug "#{e}: #{e.backtrace.join("\n ")}" raise ConfigKit::Cli::Command::CommandFailure.new(e.to_s) end end |