class Nagios::API::State

Public Class Methods

new(args = {}) click to toggle source
Calls superclass method Nagios::API::Resource::new
# File lib/nagios/api/state.rb, line 3
def initialize(args = {})
  super
  
  reload
end

Public Instance Methods

for_host(hostname) click to toggle source
# File lib/nagios/api/state.rb, line 13
def for_host(hostname)
  data[hostname]
end
reload() click to toggle source
# File lib/nagios/api/state.rb, line 9
def reload
  self.attributes = { :data => api_client.api.query("/state") }
end