Class: Keymaker::BatchGetNodesRequest
- Inherits:
-
BatchRequest
- Object
- Request
- BatchRequest
- Keymaker::BatchGetNodesRequest
- Defined in:
- lib/keymaker/requests/batch_get_nodes_request.rb
Instance Attribute Summary collapse
-
#node_ids ⇒ Object
Returns the value of attribute node_ids.
Attributes inherited from Request
Instance Method Summary collapse
- #build_job_descriptions_collection ⇒ Object
-
#initialize(service, node_ids) ⇒ BatchGetNodesRequest
constructor
A new instance of BatchGetNodesRequest.
Methods inherited from BatchRequest
Constructor Details
#initialize(service, node_ids) ⇒ BatchGetNodesRequest
Returns a new instance of BatchGetNodesRequest.
7 8 9 10 11 12 |
# File 'lib/keymaker/requests/batch_get_nodes_request.rb', line 7 def initialize(service, node_ids) self.config = service.config self.node_ids = node_ids self.service = service self.opts = build_job_descriptions_collection end |
Instance Attribute Details
#node_ids ⇒ Object
Returns the value of attribute node_ids.
5 6 7 |
# File 'lib/keymaker/requests/batch_get_nodes_request.rb', line 5 def node_ids @node_ids end |
Instance Method Details
#build_job_descriptions_collection ⇒ Object
14 15 16 17 18 19 20 |
# File 'lib/keymaker/requests/batch_get_nodes_request.rb', line 14 def build_job_descriptions_collection [].tap do |batch_jobs| node_ids.each_with_index do |node_id, job_id| batch_jobs << {id: job_id, to: node_uri(node_id), method: "GET"} end end end |