Class: Toaster::Proxy

Inherits:
Object
  • Object
show all
Defined in:
lib/toaster/util/proxy.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(target) ⇒ Proxy

Returns a new instance of Proxy.



10
11
12
# File 'lib/toaster/util/proxy.rb', line 10

def initialize(target)
  @target = target
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(name, *args, &block) ⇒ Object (protected)



18
19
20
# File 'lib/toaster/util/proxy.rb', line 18

def method_missing(name, *args, &block)
  @target.send(name, *args, &block)
end

Instance Attribute Details

#targetObject

Returns the value of attribute target.



8
9
10
# File 'lib/toaster/util/proxy.rb', line 8

def target
  @target
end