Class: YPetri::Simulation::Transitions
- Defined in:
- lib/y_petri/simulation/transitions.rb,
lib/y_petri/simulation/transitions/A.rb,
lib/y_petri/simulation/transitions/S.rb,
lib/y_petri/simulation/transitions/T.rb,
lib/y_petri/simulation/transitions/a.rb,
lib/y_petri/simulation/transitions/s.rb,
lib/y_petri/simulation/transitions/t.rb,
lib/y_petri/simulation/transitions/TS.rb,
lib/y_petri/simulation/transitions/Ts.rb,
lib/y_petri/simulation/transitions/tS.rb,
lib/y_petri/simulation/transitions/ts.rb,
lib/y_petri/simulation/transitions/types.rb,
lib/y_petri/simulation/transitions/access.rb
Overview
Simulation mixin providing access to transitions.
Defined Under Namespace
Modules: Access, Type_A, Type_S, Type_T, Type_TS, Type_Ts, Type_a, Type_s, Type_t, Type_tS, Type_ts, Types
Instance Method Summary collapse
-
#push(transition) ⇒ Object
Pushes a transition to the collection.
Methods inherited from Nodes
load, #load, #sources, #subset
Instance Method Details
#push(transition) ⇒ Object
Pushes a transition to the collection.
12 13 14 15 16 17 18 19 |
# File 'lib/y_petri/simulation/transitions.rb', line 12 def push transition t = begin; net.transition( transition ); rescue NameError, TypeError return super transition( transition ) end super t.name ? TransitionPS().new( t, name: t.name ) : TransitionTS().new( t ) end |