class Sr::Jimson::Client
Public Class Methods
batch(client) { |batch_client| ... }
click to toggle source
# File lib/sr/jimson/client.rb, line 152 def self.batch(client) helper = client.instance_variable_get(:@helper) batch_client = BatchClient.new(helper) yield batch_client helper.send_batch end
new(url, opts = {}, namespace = nil)
click to toggle source
# File lib/sr/jimson/client.rb, line 159 def initialize(url, opts = {}, namespace = nil) @url, @opts, @namespace = url, opts, namespace @helper = ClientHelper.new(url, opts, namespace) end
Public Instance Methods
[](method, *args)
click to toggle source
# File lib/sr/jimson/client.rb, line 168 def [](method, *args) if method.is_a?(Symbol) # namespace requested new_ns = @namespace.nil? ? "#{method}." : "#@namespace#{method}." return Client.new(@url, @opts, new_ns) end @helper.process_call(method, args) end
method_missing(sym, *args, &block)
click to toggle source
# File lib/sr/jimson/client.rb, line 164 def method_missing(sym, *args, &block) @helper.process_call(sym, args) end