Class: CPEE::ProcessTransformation::Loop
- Inherits:
-
Object
- Object
- CPEE::ProcessTransformation::Loop
- Defined in:
- lib/cpee/processtransformation/structures.rb
Overview
}}}
Instance Attribute Summary collapse
-
#attributes ⇒ Object
readonly
Returns the value of attribute attributes.
-
#condition ⇒ Object
Returns the value of attribute condition.
-
#condition_type ⇒ Object
Returns the value of attribute condition_type.
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#mode ⇒ Object
readonly
Returns the value of attribute mode.
-
#sub ⇒ Object
readonly
Returns the value of attribute sub.
-
#type ⇒ Object
Returns the value of attribute type.
Instance Method Summary collapse
- #condition? ⇒ Boolean
-
#initialize(id) ⇒ Loop
constructor
A new instance of Loop.
- #new_branch ⇒ Object
Methods included from Struct
Methods included from Container
Constructor Details
#initialize(id) ⇒ Loop
Returns a new instance of Loop.
110 111 112 113 114 115 116 117 118 119 |
# File 'lib/cpee/processtransformation/structures.rb', line 110 def initialize(id) @container = true @id = id @type = :loop @mode = :exclusive @condition = [] @sub = [] @condition_type = nil @attributes = {} end |
Instance Attribute Details
#attributes ⇒ Object (readonly)
Returns the value of attribute attributes.
108 109 110 |
# File 'lib/cpee/processtransformation/structures.rb', line 108 def attributes @attributes end |
#condition ⇒ Object
Returns the value of attribute condition.
107 108 109 |
# File 'lib/cpee/processtransformation/structures.rb', line 107 def condition @condition end |
#condition_type ⇒ Object
Returns the value of attribute condition_type.
107 108 109 |
# File 'lib/cpee/processtransformation/structures.rb', line 107 def condition_type @condition_type end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
106 107 108 |
# File 'lib/cpee/processtransformation/structures.rb', line 106 def id @id end |
#mode ⇒ Object (readonly)
Returns the value of attribute mode.
106 107 108 |
# File 'lib/cpee/processtransformation/structures.rb', line 106 def mode @mode end |
#sub ⇒ Object (readonly)
Returns the value of attribute sub.
106 107 108 |
# File 'lib/cpee/processtransformation/structures.rb', line 106 def sub @sub end |
#type ⇒ Object
Returns the value of attribute type.
107 108 109 |
# File 'lib/cpee/processtransformation/structures.rb', line 107 def type @type end |
Instance Method Details
#condition? ⇒ Boolean
109 |
# File 'lib/cpee/processtransformation/structures.rb', line 109 def condition?; true; end |
#new_branch ⇒ Object
120 121 122 |
# File 'lib/cpee/processtransformation/structures.rb', line 120 def new_branch (@sub << Alternative.new(@id)).last end |