Class: ZAWS::Command::Ai

Inherits:
Thor
  • Object
show all
Defined in:
lib/zaws/command/ai.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#aiObject

Returns the value of attribute ai.



8
9
10
# File 'lib/zaws/command/ai.rb', line 8

def ai
  @ai
end

#outObject

Returns the value of attribute out.



9
10
11
# File 'lib/zaws/command/ai.rb', line 9

def out
  @out
end

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=options[:home]
  value = [value] if value.instance_of?(String)
  @out.puts(@ai.query.all(options[:home], options[:verbose],value))
end