Class: SwitchTower::ExtensionProxy

Inherits:
Object
  • Object
show all
Defined in:
lib/switchtower/extensions.rb

Instance Method Summary collapse

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