Sha256: 93c89a7d00dc1319e4101a4ced87d3b77ec8b588db8b3fd1af672749ede257ca
Contents?: true
Size: 729 Bytes
Versions: 9
Compression:
Stored size: 729 Bytes
Contents
module Octoparts class AggregateRequestBuilder def initialize(&block) self.instance_eval(&block) end def request_meta(params) @request_meta = Octoparts::Model::RequestMeta.new params.each do |key, value| @request_meta.send("#{key}=", value) end end def requests(&block) self.instance_eval(&block) end def part_request(params) @requests ||= [] part_request = Octoparts::Model::PartRequest.new params.each do |key, value| part_request.send("#{key}=", value) end @requests << part_request part_request end def build Octoparts::Model::AggregateRequest.create(@request_meta, @requests) end end end
Version data entries
9 entries across 9 versions & 1 rubygems