Class: CPEE::ProcessTransformation::Parallel

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, type, wait = '-1') ⇒ Parallel

Returns a new instance of Parallel.



133
134
135
136
137
138
139
# File 'lib/cpee/processtransformation/structures.rb', line 133

def initialize(id,type,wait='-1')
  @container = true
  @id = id
  @type = type
  @sub = []
  @wait = wait
end

Instance Attribute Details

#idObject (readonly)

Returns the value of attribute id.



131
132
133
# File 'lib/cpee/processtransformation/structures.rb', line 131

def id
  @id
end

#subObject (readonly)

Returns the value of attribute sub.



131
132
133
# File 'lib/cpee/processtransformation/structures.rb', line 131

def sub
  @sub
end

#typeObject

Returns the value of attribute type.



132
133
134
# File 'lib/cpee/processtransformation/structures.rb', line 132

def type
  @type
end

#waitObject

Returns the value of attribute wait.



132
133
134
# File 'lib/cpee/processtransformation/structures.rb', line 132

def wait
  @wait
end

Instance Method Details

#new_branchObject



140
141
142
# File 'lib/cpee/processtransformation/structures.rb', line 140

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