Class: Imperium::AgentListChecksResponse

Inherits:
Response
  • Object
show all
Defined in:
lib/imperium/agent_list_checks_response.rb

Instance Method Summary collapse

Methods inherited from Response

#coerced_body, #index, #initialize, #known_leader?, #last_contact, #not_found?, #translate_addresses?

Constructor Details

This class inherits a constructor from Imperium::Response

Instance Method Details

#[](key) ⇒ Object



16
17
18
# File 'lib/imperium/agent_list_checks_response.rb', line 16

def [](key)
  checks_hash[key]
end

#checksObject



8
9
10
# File 'lib/imperium/agent_list_checks_response.rb', line 8

def checks
  @checks ||= checks_hash.values
end

#checks_hashObject



12
13
14
# File 'lib/imperium/agent_list_checks_response.rb', line 12

def checks_hash
  @checks_hash ||= (ok? ? coerced_body : {})
end

#each(&block) ⇒ Object



20
21
22
# File 'lib/imperium/agent_list_checks_response.rb', line 20

def each(&block)
  checks.each(&block)
end