Module: Nano::Proxy
- Includes:
- ApplicationHelper
- Defined in:
- lib/nano_rpc/proxy.rb
Defined Under Namespace
Modules: ClassMethods
Instance Attribute Summary collapse
-
#client ⇒ Object
Returns the value of attribute client.
Class Method Summary collapse
Instance Method Summary collapse
Instance Attribute Details
#client ⇒ Object
Returns the value of attribute client.
5 6 7 |
# File 'lib/nano_rpc/proxy.rb', line 5 def client @client end |
Class Method Details
.included(base) ⇒ Object
12 13 14 |
# File 'lib/nano_rpc/proxy.rb', line 12 def self.included(base) base.extend(ClassMethods) end |
Instance Method Details
#initialize(opts = {}) ⇒ Object
7 8 9 10 |
# File 'lib/nano_rpc/proxy.rb', line 7 def initialize(opts = {}) @client = opts[:client] || Nano.client self.class.proxy_methods&.each { |m| define_proxy_method(m) } end |
#proxy_methods ⇒ Object
32 33 34 |
# File 'lib/nano_rpc/proxy.rb', line 32 def proxy_methods self.class.proxy_methods end |