Class: Jimson::BatchClient

Inherits:
BlankSlate
  • Object
show all
Defined in:
lib/jimson/client.rb

Instance Method Summary collapse

Constructor Details

#initialize(helper) ⇒ BatchClient

Returns a new instance of BatchClient.



148
149
150
# File 'lib/jimson/client.rb', line 148

def initialize(helper)
  @helper = helper
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(sym, *args, &block) ⇒ Object



152
153
154
155
156
# File 'lib/jimson/client.rb', line 152

def method_missing(sym, *args, &block)
  args = args.first if args.size == 1 && args.first.is_a?(Hash)
  request = Jimson::Request.new(sym.to_s, args)
  @helper.push_batch_request(request)
end