Class: Prospectus::StateDSL
- Inherits:
-
Object
- Object
- Prospectus::StateDSL
- Defined in:
- lib/prospectus/state.rb
Overview
DSL for wrapping eval of states
Instance Method Summary collapse
-
#initialize(state, params) ⇒ StateDSL
constructor
A new instance of StateDSL.
- #method_missing(method, *args, &block) ⇒ Object
Constructor Details
#initialize(state, params) ⇒ StateDSL
Returns a new instance of StateDSL.
23 24 25 26 |
# File 'lib/prospectus/state.rb', line 23 def initialize(state, params) @state = state = params end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(method, *args, &block) ⇒ Object
28 29 30 31 32 33 |
# File 'lib/prospectus/state.rb', line 28 def method_missing(method, *args, &block) return super if @module @module = Prospectus.modules.find(method) return super unless @module extend @module end |