lib/y_petri/simulation/transitions.rb in y_petri-2.2.4 vs lib/y_petri/simulation/transitions.rb in y_petri-2.3.2

- old
+ new

@@ -1,19 +1,17 @@ # encoding: utf-8 -# Transition collection for YPetri::Simulation. -# class YPetri::Simulation - class Transitions < Elements + # Transition collection for YPetri::Simulation. + # + class Transitions < Nodes require_relative 'transitions/types' - include Types + ★ Types # ★ means include # Pushes a transition to the collection. # def push transition - t = begin - net.transition( transition ) - rescue NameError, TypeError + t = begin; net.transition( transition ); rescue NameError, TypeError return super transition( transition ) end super t.name ? Transition().new( t, name: t.name ) : Transition().new( t ) end end # class Transitions