Class: CPEE::ProcessTransformation::Loop

Inherits:
Object
  • Object
show all
Includes:
Container, Struct, Enumerable
Defined in:
lib/cpee/processtransformation/structures.rb

Overview

}}}

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Struct

#each, #length

Methods included from Container

#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

#attributesObject (readonly)

Returns the value of attribute attributes.



108
109
110
# File 'lib/cpee/processtransformation/structures.rb', line 108

def attributes
  @attributes
end

#conditionObject

Returns the value of attribute condition.



107
108
109
# File 'lib/cpee/processtransformation/structures.rb', line 107

def condition
  @condition
end

#condition_typeObject

Returns the value of attribute condition_type.



107
108
109
# File 'lib/cpee/processtransformation/structures.rb', line 107

def condition_type
  @condition_type
end

#idObject (readonly)

Returns the value of attribute id.



106
107
108
# File 'lib/cpee/processtransformation/structures.rb', line 106

def id
  @id
end

#modeObject (readonly)

Returns the value of attribute mode.



106
107
108
# File 'lib/cpee/processtransformation/structures.rb', line 106

def mode
  @mode
end

#subObject (readonly)

Returns the value of attribute sub.



106
107
108
# File 'lib/cpee/processtransformation/structures.rb', line 106

def sub
  @sub
end

#typeObject

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

Returns:

  • (Boolean)


109
# File 'lib/cpee/processtransformation/structures.rb', line 109

def condition?; true; end

#new_branchObject



120
121
122
# File 'lib/cpee/processtransformation/structures.rb', line 120

def new_branch
  (@sub << Alternative.new(@id)).last
end