Class: Electrb::Client
- Inherits:
-
Object
- Object
- Electrb::Client
- Defined in:
- lib/electrb/client.rb
Instance Attribute Summary collapse
-
#client ⇒ Object
readonly
Returns the value of attribute client.
Instance Method Summary collapse
-
#initialize(host, port) ⇒ Client
constructor
A new instance of Client.
-
#request(method_name, *args) ⇒ String
Send RPC request.
Constructor Details
#initialize(host, port) ⇒ Client
Returns a new instance of Client.
7 8 9 |
# File 'lib/electrb/client.rb', line 7 def initialize(host, port) @client = Jsonrpctcp::Client.new(host, port) end |
Instance Attribute Details
#client ⇒ Object (readonly)
Returns the value of attribute client.
5 6 7 |
# File 'lib/electrb/client.rb', line 5 def client @client end |
Instance Method Details
#request(method_name, *args) ⇒ String
Send RPC request.
14 15 16 |
# File 'lib/electrb/client.rb', line 14 def request(method_name, *args) send_request(method_name, *args) end |