Class: Jimson::Client
- Inherits:
-
Object
- Object
- Jimson::Client
- Defined in:
- lib/jimson/client.rb
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(url) ⇒ Client
constructor
A new instance of Client.
- #method_missing(sym, *args, &block) ⇒ Object
Constructor Details
#initialize(url) ⇒ Client
Returns a new instance of Client.
157 158 159 |
# File 'lib/jimson/client.rb', line 157 def initialize(url) @helper = ClientHelper.new(url) end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(sym, *args, &block) ⇒ Object
161 162 163 |
# File 'lib/jimson/client.rb', line 161 def method_missing(sym, *args, &block) @helper.process_call(sym, args) end |
Class Method Details
.batch(client) {|batch_client| ... } ⇒ Object
150 151 152 153 154 155 |
# File 'lib/jimson/client.rb', line 150 def self.batch(client) helper = client.instance_variable_get(:@helper) batch_client = BatchClient.new(helper) yield batch_client helper.send_batch end |