Class: Flo::State

Inherits:
Object
  • Object
show all
Defined in:
lib/flo/state.rb

Instance Method Summary collapse

Constructor Details

#initialize(provider) ⇒ State

Returns a new instance of State.



9
10
11
# File 'lib/flo/state.rb', line 9

def initialize(provider)
  @provider = provider
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(meth_sym, *args) ⇒ Object



13
14
15
16
17
# File 'lib/flo/state.rb', line 13

def method_missing(meth_sym, *args)
  lambda do
    provider.method(meth_sym).call(*args)
  end
end