Class: FSM::GenericDSL
- Inherits:
-
Object
show all
- Defined in:
- lib/fsm-0.0.0/dsl.rb
Instance Method Summary
collapse
Constructor Details
#initialize(object) ⇒ GenericDSL
16
17
18
|
# File 'lib/fsm-0.0.0/dsl.rb', line 16
def initialize object
@object = object
end
|
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(m, *a, &b) ⇒ Object
19
20
21
22
23
24
25
|
# File 'lib/fsm-0.0.0/dsl.rb', line 19
def method_missing m, *a, &b
if @object.respond_to? m
@object.send m, *a, &b
else
super
end
end
|
Instance Method Details
26
27
28
|
# File 'lib/fsm-0.0.0/dsl.rb', line 26
def configure &b
instance_eval &b
end
|