Module: YPetri::Simulation::TransitionRepresentation::Types
- Defined in:
- lib/y_petri/simulation/transition_representation/types.rb
Instance Attribute Summary collapse
-
#type ⇒ Object
readonly
The transition’s type.
Instance Method Summary collapse
-
#Ts? ⇒ Boolean
Is this a Ts transition?.
-
#TS? ⇒ Boolean
Is this a TS transition?.
-
#ts? ⇒ Boolean
Is this a ts transition?.
-
#tS? ⇒ Boolean
Is this a tS transition?.
- #type_init(*args) ⇒ Object
Instance Attribute Details
#type ⇒ Object (readonly)
The transition’s type.
33 34 35 |
# File 'lib/y_petri/simulation/transition_representation/types.rb', line 33 def type @type end |
Instance Method Details
#Ts? ⇒ Boolean
Is this a Ts transition?
44 |
# File 'lib/y_petri/simulation/transition_representation/types.rb', line 44 def Ts?; type == :Ts end |
#TS? ⇒ Boolean
Is this a TS transition?
40 |
# File 'lib/y_petri/simulation/transition_representation/types.rb', line 40 def TS?; type == :TS end |
#ts? ⇒ Boolean
Is this a ts transition?
52 |
# File 'lib/y_petri/simulation/transition_representation/types.rb', line 52 def ts?; type == :ts end |
#tS? ⇒ Boolean
Is this a tS transition?
48 |
# File 'lib/y_petri/simulation/transition_representation/types.rb', line 48 def tS?; type == :tS end |
#type_init(*args) ⇒ Object
20 21 22 23 24 25 26 27 28 29 |
# File 'lib/y_petri/simulation/transition_representation/types.rb', line 20 def type_init *args extend case source.type when :A then Type_A when :TS then Type_TS when :Ts then Type_Ts when :tS then Type_tS when :ts then Type_ts else fail TypeError, "Unknown tr. type #{source.type}!" end init end |