Class: CPEE::Transformation::Alternative
- Inherits:
-
Array
- Object
- Array
- CPEE::Transformation::Alternative
- Includes:
- Container
- Defined in:
- lib/cpee/transformation/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.
-
#otherwise ⇒ Object
Returns the value of attribute otherwise.
Instance Method Summary collapse
- #condition? ⇒ Boolean
-
#initialize(id) ⇒ Alternative
constructor
A new instance of Alternative.
- #inspect ⇒ Object
Methods included from Container
Constructor Details
#initialize(id) ⇒ Alternative
Returns a new instance of Alternative.
95 96 97 98 99 100 101 102 |
# File 'lib/cpee/transformation/structures.rb', line 95 def initialize(id) @container = true @id = id @otherwise = false @condition = [] @condition_type = nil @attributes = {} end |
Instance Attribute Details
#attributes ⇒ Object (readonly)
Returns the value of attribute attributes.
93 94 95 |
# File 'lib/cpee/transformation/structures.rb', line 93 def attributes @attributes end |
#condition ⇒ Object
Returns the value of attribute condition.
92 93 94 |
# File 'lib/cpee/transformation/structures.rb', line 92 def condition @condition end |
#condition_type ⇒ Object
Returns the value of attribute condition_type.
92 93 94 |
# File 'lib/cpee/transformation/structures.rb', line 92 def condition_type @condition_type end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
93 94 95 |
# File 'lib/cpee/transformation/structures.rb', line 93 def id @id end |
#otherwise ⇒ Object
Returns the value of attribute otherwise.
92 93 94 |
# File 'lib/cpee/transformation/structures.rb', line 92 def otherwise @otherwise end |
Instance Method Details
#condition? ⇒ Boolean
94 |
# File 'lib/cpee/transformation/structures.rb', line 94 def condition?; true; end |
#inspect ⇒ Object
103 104 105 |
# File 'lib/cpee/transformation/structures.rb', line 103 def inspect ::Object::inspect() end |