Class: SwitchTower::ExtensionProxy
- Inherits:
-
Object
- Object
- SwitchTower::ExtensionProxy
- Defined in:
- lib/switchtower/extensions.rb
Instance Method Summary collapse
-
#initialize(actor, mod) ⇒ ExtensionProxy
constructor
A new instance of ExtensionProxy.
- #method_missing(sym, *args, &block) ⇒ Object
Constructor Details
#initialize(actor, mod) ⇒ ExtensionProxy
Returns a new instance of ExtensionProxy.
5 6 7 8 |
# File 'lib/switchtower/extensions.rb', line 5 def initialize(actor, mod) @actor = actor extend(mod) end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(sym, *args, &block) ⇒ Object
10 11 12 |
# File 'lib/switchtower/extensions.rb', line 10 def method_missing(sym, *args, &block) @actor.send(sym, *args, &block) end |