Class: PipeRpc::Client
- Inherits:
-
BasicInterface
- Object
- BasicInterface
- PipeRpc::Client
- Defined in:
- lib/pipe_rpc/client.rb
Defined Under Namespace
Classes: Request
Instance Attribute Summary collapse
-
#__rpc_server_id__ ⇒ Object
readonly
Returns the value of attribute rpc_server_id.
Instance Method Summary collapse
-
#initialize(server_id = :default, hub) ⇒ Client
constructor
A new instance of Client.
- #method_missing(method, *args) ⇒ Object
- #respond_to?(method) ⇒ Boolean
- #to_s ⇒ Object
Constructor Details
#initialize(server_id = :default, hub) ⇒ Client
Returns a new instance of Client.
3 4 5 6 |
# File 'lib/pipe_rpc/client.rb', line 3 def initialize(server_id = :default, hub) @__rpc_server_id__ = server_id.to_sym @hub = hub end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
Instance Attribute Details
#__rpc_server_id__ ⇒ Object (readonly)
Returns the value of attribute rpc_server_id.
8 9 10 |
# File 'lib/pipe_rpc/client.rb', line 8 def __rpc_server_id__ @__rpc_server_id__ end |
Instance Method Details
#respond_to?(method) ⇒ Boolean
10 11 12 |
# File 'lib/pipe_rpc/client.rb', line 10 def respond_to?(method) super or method_missing(:respond_to?, method) end |
#to_s ⇒ Object
19 20 21 |
# File 'lib/pipe_rpc/client.rb', line 19 def to_s "<Client:#{@__rpc_server_id__}>" end |