Module: YPetri::Simulation::Transitions::Access

Defined in:
lib/y_petri/simulation/transitions/access.rb

Instance Method Summary collapse

Instance Method Details

#includes_transition?(transition) ⇒ Boolean Also known as: include_transition?

Does a transition belong to the simulation?

Returns:

  • (Boolean)


9
10
11
12
13
# File 'lib/y_petri/simulation/transitions/access.rb', line 9

def includes_transition?( transition )
  true.tap { begin; transition( transition ); rescue NameError, TypeError
               return false
             end }
end

#t(transition) ⇒ Object

Net’s transition.



18
19
20
# File 'lib/y_petri/simulation/transitions/access.rb', line 18

def t( transition )
  transition( transition ).source
end