Class: Deis::Commands::Info
- Inherits:
-
Struct
- Object
- Struct
- Deis::Commands::Info
- Includes:
- Helpers
- Defined in:
- lib/deis/commands/info.rb
Instance Attribute Summary collapse
-
#app ⇒ Object
Returns the value of attribute app.
Instance Method Summary collapse
Methods included from Helpers
#app_exists?, #capture_output, #capture_syscall, #debug?, #deis_command, #deis_local_command, #deis_login!, #deploy, #get_runner, #get_units!, #git_clone, #increment_retry!, #info, #reset_retry!, #run_util, #scale, seconds_to_human, #shell, #should_retry?, #status, #units
Instance Attribute Details
#app ⇒ Object
Returns the value of attribute app
3 4 5 |
# File 'lib/deis/commands/info.rb', line 3 def app @app end |
Instance Method Details
#output_hash(hash, indent = 0) ⇒ Object
12 13 14 15 16 17 18 19 20 21 22 23 24 |
# File 'lib/deis/commands/info.rb', line 12 def output_hash(hash, indent = 0) hash.each do |k, v| case v when Hash puts (' ' * indent) + k + ':' output_hash(v, indent + 1) when Array puts (' ' * indent) + k + ':', *v.map { |i| (' ' * (indent + 1)) + i.to_s } else puts (' ' * indent) + "#{k}: #{v}" end end end |
#run ⇒ Object
6 7 8 9 10 |
# File 'lib/deis/commands/info.rb', line 6 def run h = info(app) status "`#{app}` Information" output_hash h end |