Class: ZAWS::Command::Sumo
- Inherits:
-
Thor
- Object
- Thor
- ZAWS::Command::Sumo
- Defined in:
- lib/zaws/command/sumo.rb
Instance Attribute Summary collapse
-
#out ⇒ Object
Returns the value of attribute out.
-
#print_exit_code ⇒ Object
Returns the value of attribute print_exit_code.
-
#sumo ⇒ Object
Returns the value of attribute sumo.
Instance Method Summary collapse
-
#initialize(*args) ⇒ Sumo
constructor
A new instance of Sumo.
- #view_collectors ⇒ Object
- #view_sources(collector_name) ⇒ Object
Constructor Details
#initialize(*args) ⇒ Sumo
Returns a new instance of Sumo.
12 13 14 15 16 17 18 19 |
# File 'lib/zaws/command/sumo.rb', line 12 def initialize(*args) super shellout=ZAWS::Helper::Shell.new sumoapi = ZAWS::Sumoapi.new(shellout) @sumo = ZAWS::Controllers::Sumo.new(shellout, sumoapi) @out = $stdout @print_exit_code = false end |
Instance Attribute Details
#out ⇒ Object
Returns the value of attribute out.
9 10 11 |
# File 'lib/zaws/command/sumo.rb', line 9 def out @out end |
#print_exit_code ⇒ Object
Returns the value of attribute print_exit_code.
10 11 12 |
# File 'lib/zaws/command/sumo.rb', line 10 def print_exit_code @print_exit_code end |
#sumo ⇒ Object
Returns the value of attribute sumo.
8 9 10 |
# File 'lib/zaws/command/sumo.rb', line 8 def sumo @sumo end |
Instance Method Details
#view_collectors ⇒ Object
23 24 25 |
# File 'lib/zaws/command/sumo.rb', line 23 def view_collectors @sumo.view([:home], @out, ([:verbose] ? @out : nil)) end |
#view_sources(collector_name) ⇒ Object
28 29 30 |
# File 'lib/zaws/command/sumo.rb', line 28 def view_sources(collector_name) @out.puts(@sumo.view_sources(collector_name,[:home], [:verbose])) end |