Class: Laurel::Proxy
- Inherits:
- BasicObject
- Defined in:
- lib/laurel/proxy.rb
Instance Method Summary collapse
-
#initialize(&block) ⇒ Proxy
constructor
A new instance of Proxy.
- #method_missing(name, *args, &block) ⇒ Object
Constructor Details
#initialize(&block) ⇒ Proxy
Returns a new instance of Proxy.
3 4 5 |
# File 'lib/laurel/proxy.rb', line 3 def initialize &block @block = block end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(name, *args, &block) ⇒ Object
7 8 9 |
# File 'lib/laurel/proxy.rb', line 7 def method_missing name, *args, &block @block.call name, *args, &block end |