Class: Imperium::AgentListServicesResponse
- Defined in:
- lib/imperium/agent_list_services_response.rb
Overview
Note:
This class doesn’t really make sense to be instantiated outside of Imperium::Agent#list_services
AgentListServiceResponse is a wrapper for the raw HTTP::Message response
from the API
We’ve included Enumerable and implemented #each so it can be treated as an array of Service objects.
Instance Method Summary collapse
- #each(&block) ⇒ Object
-
#services ⇒ Array<Service>
Build an array of Service objects from the response.
-
#services_hash ⇒ Hash<String => Service>
Build a hash of Service object from the response.
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
#each(&block) ⇒ Object
16 17 18 |
# File 'lib/imperium/agent_list_services_response.rb', line 16 def each(&block) services.each(&block) end |