Class: CPEE::Transformation::Conditional
- Inherits:
-
Object
- Object
- CPEE::Transformation::Conditional
- Defined in:
- lib/cpee/transformation/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.
-
#label ⇒ Object
readonly
Returns the value of attribute label.
-
#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, label = '') ⇒ Conditional
constructor
A new instance of Conditional.
- #new_branch ⇒ Object
Methods included from Struct
Methods included from Container
Constructor Details
#initialize(id, mode, type, label = '') ⇒ Conditional
Returns a new instance of Conditional.
167 168 169 170 171 172 173 174 175 |
# File 'lib/cpee/transformation/structures.rb', line 167 def initialize(id,mode,type,label='') @container = true @id = id @label = label @sub = [] @mode = mode @type = type @attributes = {} end |
Instance Attribute Details
#attributes ⇒ Object (readonly)
Returns the value of attribute attributes.
165 166 167 |
# File 'lib/cpee/transformation/structures.rb', line 165 def attributes @attributes end |
#container ⇒ Object (readonly)
Returns the value of attribute container.
163 164 165 |
# File 'lib/cpee/transformation/structures.rb', line 163 def container @container end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
164 165 166 |
# File 'lib/cpee/transformation/structures.rb', line 164 def id @id end |
#label ⇒ Object (readonly)
Returns the value of attribute label.
164 165 166 |
# File 'lib/cpee/transformation/structures.rb', line 164 def label @label end |
#mode ⇒ Object (readonly)
Returns the value of attribute mode.
164 165 166 |
# File 'lib/cpee/transformation/structures.rb', line 164 def mode @mode end |
#sub ⇒ Object (readonly)
Returns the value of attribute sub.
164 165 166 |
# File 'lib/cpee/transformation/structures.rb', line 164 def sub @sub end |
#type ⇒ Object
Returns the value of attribute type.
166 167 168 |
# File 'lib/cpee/transformation/structures.rb', line 166 def type @type end |
Instance Method Details
#new_branch ⇒ Object
176 177 178 |
# File 'lib/cpee/transformation/structures.rb', line 176 def new_branch (@sub << Alternative.new(@id)).last end |