Class: Flo::State
- Inherits:
-
Object
- Object
- Flo::State
- Defined in:
- lib/flo/state.rb
Instance Method Summary collapse
-
#initialize(provider) ⇒ State
constructor
A new instance of State.
- #method_missing(meth_sym, *args) ⇒ Object
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 |