Class: CPEE::Transformation::Alternative

Inherits:
Array
  • Object
show all
Includes:
Container
Defined in:
lib/cpee/transformation/structures.rb

Overview

}}}

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Container

#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

#attributesObject (readonly)

Returns the value of attribute attributes.



93
94
95
# File 'lib/cpee/transformation/structures.rb', line 93

def attributes
  @attributes
end

#conditionObject

Returns the value of attribute condition.



92
93
94
# File 'lib/cpee/transformation/structures.rb', line 92

def condition
  @condition
end

#condition_typeObject

Returns the value of attribute condition_type.



92
93
94
# File 'lib/cpee/transformation/structures.rb', line 92

def condition_type
  @condition_type
end

#idObject (readonly)

Returns the value of attribute id.



93
94
95
# File 'lib/cpee/transformation/structures.rb', line 93

def id
  @id
end

#otherwiseObject

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

Returns:

  • (Boolean)


94
# File 'lib/cpee/transformation/structures.rb', line 94

def condition?; true; end

#inspectObject



103
104
105
# File 'lib/cpee/transformation/structures.rb', line 103

def inspect
  ::Object::inspect()
end