Class: FSM::System::DSL

Inherits:
GenericDSL show all
Defined in:
lib/fsm-0.0.0/dsl.rb

Instance Method Summary collapse

Methods inherited from GenericDSL

#configure, #initialize

Constructor Details

This class inherits a constructor from FSM::GenericDSL

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(m, *a, &b) ⇒ Object



60
61
62
63
64
65
66
# File 'lib/fsm-0.0.0/dsl.rb', line 60

def method_missing m, *a, &b
  if fsm.respond_to? m
    fsm.send m, *a, &b
  else
    super
  end
end

Instance Method Details

#fsm(&b) ⇒ Object



52
53
54
# File 'lib/fsm-0.0.0/dsl.rb', line 52

def fsm &b
  b ? fsm.configure(&b) : @object.fsm
end

#observer(&b) ⇒ Object



56
57
58
# File 'lib/fsm-0.0.0/dsl.rb', line 56

def observer &b
  b ? observer.configure(&b) : @object.observer
end