Class: ZAWS::Command::Newrelic

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(*args) ⇒ Newrelic

Returns a new instance of Newrelic.



12
13
14
15
16
17
18
19
# File 'lib/zaws/command/newrelic.rb', line 12

def initialize(*args)
  super
  shellout=ZAWS::Helper::Shell.new
  newrelicapi = ZAWS::Newrelicapi.new(shellout)
  @newrelic = ZAWS::Controllers::Newrelic.new(shellout, newrelicapi)
  @out = $stdout
  @print_exit_code = false
end

Instance Attribute Details

#newrelicObject

Returns the value of attribute newrelic.



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

def newrelic
  @newrelic
end

#outObject

Returns the value of attribute out.



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

def out
  @out
end

Returns the value of attribute print_exit_code.



10
11
12
# File 'lib/zaws/command/newrelic.rb', line 10

def print_exit_code
  @print_exit_code
end

Instance Method Details

#view_serversObject



23
24
25
# File 'lib/zaws/command/newrelic.rb', line 23

def view_servers
  @newrelic.servers.view(options[:home], @out, (options[:verbose] ? @out : nil))
end