Class: YPetri::Simulation::Places
- Defined in:
- lib/y_petri/simulation/places.rb,
lib/y_petri/simulation/places/free.rb,
lib/y_petri/simulation/places/types.rb,
lib/y_petri/simulation/places/access.rb,
lib/y_petri/simulation/places/clamped.rb
Overview
A mixin for collections of free places.
Defined Under Namespace
Modules: Access, Type_clamped, Type_free, Types
Instance Method Summary collapse
-
#marking ⇒ Object
Marking of the place collection in the current simulation.
-
#push(place) ⇒ Object
Pushes a place to the collection.
Methods inherited from Nodes
load, #load, #sources, #subset
Instance Method Details
#marking ⇒ Object
Marking of the place collection in the current simulation.
21 22 23 |
# File 'lib/y_petri/simulation/places.rb', line 21 def marking simulation.M self end |
#push(place) ⇒ Object
Pushes a place to the collection.
12 13 14 15 16 17 |
# File 'lib/y_petri/simulation/places.rb', line 12 def push place p = begin; net.place( place ); rescue NameError, TypeError return super place( place ) end super p.name ? PlacePS().new( p, name: p.name ) : PlacePS().new( p ) end |