Class: Toaster::Proxy
- Inherits:
-
Object
- Object
- Toaster::Proxy
- Defined in:
- lib/toaster/util/proxy.rb
Instance Attribute Summary collapse
-
#target ⇒ Object
Returns the value of attribute target.
Instance Method Summary collapse
-
#initialize(target) ⇒ Proxy
constructor
A new instance of Proxy.
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
#target ⇒ Object
Returns the value of attribute target.
8 9 10 |
# File 'lib/toaster/util/proxy.rb', line 8 def target @target end |