Class: StateMethods::Implementations::Proxy

Inherits:
Object
  • Object
show all
Defined in:
lib/state_methods/implementations/classy.rb

Instance Method Summary collapse

Constructor Details

#initialize(base) ⇒ Proxy

Returns a new instance of Proxy.



8
9
10
# File 'lib/state_methods/implementations/classy.rb', line 8

def initialize(base)
  @base = base
end

Instance Method Details

#base_proxy_for(state) ⇒ Object



12
13
14
# File 'lib/state_methods/implementations/classy.rb', line 12

def base_proxy_for(state)
  @base.class._state_method_factory_for(*_keys).class_for(state).new(@base)
end