Class: FSM::System

Inherits:
Object
  • Object
show all
Includes:
Util
Defined in:
lib/fsm-0.0.0/dsl.rb,
lib/fsm-0.0.0/system.rb

Defined Under Namespace

Classes: DSL

Instance Method Summary collapse

Methods included from Util

included

Constructor Details

#initialize(fsm = FSM.new, &b) ⇒ System

Returns a new instance of System.


23
24
25
26
27
28
# File 'lib/fsm-0.0.0/system.rb', line 23

def initialize fsm = FSM.new, &b
  @fsm = fsm
  @observer = Observer.new @fsm
  @dsl = DSL.new self 
  configure &b if b
end

Instance Method Details

#configure(&b) ⇒ Object


30
31
32
# File 'lib/fsm-0.0.0/system.rb', line 30

def configure &b
  @dsl.configure &b
end