Class: CPEE::ProcessTransformation::Conditional
- Inherits:
-
Object
- Object
- CPEE::ProcessTransformation::Conditional
- Defined in:
- lib/cpee/processtransformation/structures.rb
Overview
}}}
Instance Attribute Summary collapse
-
#attributes ⇒ Object
readonly
Returns the value of attribute attributes.
-
#container ⇒ Object
readonly
Returns the value of attribute container.
-
#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
-
#initialize(id, mode, type) ⇒ Conditional
constructor
A new instance of Conditional.
- #new_branch ⇒ Object
Methods included from Struct
Methods included from Container
Constructor Details
#initialize(id, mode, type) ⇒ Conditional
Returns a new instance of Conditional.
151 152 153 154 155 156 157 158 |
# File 'lib/cpee/processtransformation/structures.rb', line 151 def initialize(id,mode,type) @container = true @id = id @sub = [] @mode = mode @type = type @attributes = {} end |
Instance Attribute Details
#attributes ⇒ Object (readonly)
Returns the value of attribute attributes.
149 150 151 |
# File 'lib/cpee/processtransformation/structures.rb', line 149 def attributes @attributes end |
#container ⇒ Object (readonly)
Returns the value of attribute container.
147 148 149 |
# File 'lib/cpee/processtransformation/structures.rb', line 147 def container @container end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
148 149 150 |
# File 'lib/cpee/processtransformation/structures.rb', line 148 def id @id end |
#mode ⇒ Object (readonly)
Returns the value of attribute mode.
148 149 150 |
# File 'lib/cpee/processtransformation/structures.rb', line 148 def mode @mode end |
#sub ⇒ Object (readonly)
Returns the value of attribute sub.
148 149 150 |
# File 'lib/cpee/processtransformation/structures.rb', line 148 def sub @sub end |
#type ⇒ Object
Returns the value of attribute type.
150 151 152 |
# File 'lib/cpee/processtransformation/structures.rb', line 150 def type @type end |
Instance Method Details
#new_branch ⇒ Object
159 160 161 |
# File 'lib/cpee/processtransformation/structures.rb', line 159 def new_branch (@sub << Alternative.new(@id)).last end |