# File lib/taskjuggler/Attributes.rb, line 56 def initialize(property, type, container) super set(Array.new) end
# File lib/taskjuggler/Attributes.rb, line 62 def AllocationAttribute::tjpId 'allocation' end
# File lib/taskjuggler/Attributes.rb, line 75 def to_s(query = nil) out = '' first = true get.each do |allocation| if first first = false else out << "\n" end out << '[ ' firstR = true allocation.candidates.each do |resource| if firstR firstR = false else out << ', ' end out << resource.fullId end modes = %w(order lowprob lowload hiload random) out << " ] select by #{modes[allocation.selectionMode]} " out << 'mandatory ' if allocation.mandatory out << 'persistent ' if allocation.persistent end out end
# File lib/taskjuggler/Attributes.rb, line 66 def to_tjp out = [] get.each do |allocation| out.push("allocate #{allocation.to_tjp}\n") # TODO: incomplete end out end