Class: Ava::Replicant
- Inherits:
- BasicObject
- Defined in:
- lib/client/replicant.rb
Instance Attribute Summary collapse
-
#client ⇒ Object
Returns the value of attribute client.
-
#object ⇒ Object
Returns the value of attribute object.
Instance Method Summary collapse
-
#initialize(object, client) ⇒ Replicant
constructor
A new instance of Replicant.
- #is_replicant? ⇒ Boolean
- #method_missing(*args, **named) ⇒ Object
Constructor Details
#initialize(object, client) ⇒ Replicant
Returns a new instance of Replicant.
6 7 8 9 |
# File 'lib/client/replicant.rb', line 6 def initialize object, client self.object = object self.client = client end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(*args, **named) ⇒ Object
15 16 17 |
# File 'lib/client/replicant.rb', line 15 def method_missing *args, **named @client.send @object, args.first, *args[1..-1], **named end |
Instance Attribute Details
#client ⇒ Object
Returns the value of attribute client.
4 5 6 |
# File 'lib/client/replicant.rb', line 4 def client @client end |
#object ⇒ Object
Returns the value of attribute object.
4 5 6 |
# File 'lib/client/replicant.rb', line 4 def object @object end |
Instance Method Details
#is_replicant? ⇒ Boolean
11 12 13 |
# File 'lib/client/replicant.rb', line 11 def is_replicant? true end |