Module: Stamina::Dsl::Automata

Included in:
Stamina::Dsl
Defined in:
lib/stamina-core/stamina/dsl/automata.rb

Instance Method Summary collapse

Instance Method Details

#automaton(arg) ⇒ Object

Coerces ‘arg` to an automaton



8
9
10
# File 'lib/stamina-core/stamina/dsl/automata.rb', line 8

def automaton(arg)
  Automaton.coerce(arg)
end

#compose(*args) ⇒ Object

Computes the synchronous composition of many automata



15
16
17
18
# File 'lib/stamina-core/stamina/dsl/automata.rb', line 15

def compose(*args)
  automata = args.collect{|a| automaton(a)}
  Stamina::Automaton::Compose.execute(automata)
end