Class: ZAWS::Command::Ai
- Inherits:
-
Thor
- Object
- Thor
- ZAWS::Command::Ai
- Defined in:
- lib/zaws/command/ai.rb
Instance Attribute Summary collapse
-
#ai ⇒ Object
Returns the value of attribute ai.
-
#out ⇒ Object
Returns the value of attribute out.
-
#print_exit_code ⇒ Object
Returns the value of attribute print_exit_code.
Instance Method Summary collapse
-
#initialize(*args) ⇒ Ai
constructor
A new instance of Ai.
- #query(*value) ⇒ Object
Constructor Details
#initialize(*args) ⇒ Ai
Returns a new instance of Ai.
12 13 14 15 16 17 18 19 20 21 22 |
# File 'lib/zaws/command/ai.rb', line 12 def initialize(*args) super shellout=ZAWS::Helper::Shell.new nessusapi = ZAWS::Nessusapi.new(shellout) sumoapi = ZAWS::Sumoapi.new(shellout) newrelicapi = ZAWS::Newrelicapi.new(shellout) awscli = ZAWS::AWSCLI.new(shellout) @ai = ZAWS::Controllers::AI.new(shellout, nessusapi,sumoapi,newrelicapi,awscli) @out = $stdout @print_exit_code = false end |
Instance Attribute Details
#ai ⇒ Object
Returns the value of attribute ai.
8 9 10 |
# File 'lib/zaws/command/ai.rb', line 8 def ai @ai end |
#out ⇒ Object
Returns the value of attribute out.
9 10 11 |
# File 'lib/zaws/command/ai.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/ai.rb', line 10 def print_exit_code @print_exit_code end |
Instance Method Details
#query(*value) ⇒ Object
26 27 28 29 30 |
# File 'lib/zaws/command/ai.rb', line 26 def query(*value) @ai.awscli.home=[:home] value = [value] if value.instance_of?(String) @out.puts(@ai.query.all([:home], [:verbose],value)) end |