Class: JSONRPC::BatchClient
Constant Summary
Constants inherited from Base
JSONRPC::Base::JSON_RPC_VERSION
Instance Attribute Summary collapse
-
#batch ⇒ Object
readonly
Returns the value of attribute batch.
Instance Method Summary collapse
-
#initialize(url, opts = {}) {|_self| ... } ⇒ BatchClient
constructor
A new instance of BatchClient.
- #method_missing(sym, *args, &block) ⇒ Object
Methods inherited from Base
#class, #inspect, make_id, #to_s
Constructor Details
#initialize(url, opts = {}) {|_self| ... } ⇒ BatchClient
Returns a new instance of BatchClient.
84 85 86 87 88 89 90 91 |
# File 'lib/jsonrpc/client.rb', line 84 def initialize(url, opts = {}) super @batch = [] @alive = true yield self send_batch @alive = false end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
Instance Attribute Details
#batch ⇒ Object (readonly)
Returns the value of attribute batch.
82 83 84 |
# File 'lib/jsonrpc/client.rb', line 82 def batch @batch end |