Class: Ava::Replicant

Inherits:
BasicObject
Defined in:
lib/client/replicant.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#clientObject

Returns the value of attribute client.



4
5
6
# File 'lib/client/replicant.rb', line 4

def client
  @client
end

#objectObject

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

Returns:

  • (Boolean)


11
12
13
# File 'lib/client/replicant.rb', line 11

def is_replicant?
  true
end