Class Index [+]

Quicksearch

TaskJuggler::AllocationAttribute

Public Class Methods

new(property, type) click to toggle source
    # File lib/Attributes.rb, line 44
44:     def initialize(property, type)
45:       super
46: 
47:       @value = Array.new
48:     end
tjpId() click to toggle source
    # File lib/Attributes.rb, line 50
50:     def AllocationAttribute::tjpId
51:       'allocation'
52:     end

Public Instance Methods

to_s(query = nil) click to toggle source
    # File lib/Attributes.rb, line 63
63:     def to_s(query = nil)
64:       out = ''
65:       first = true
66:       @value.each do |allocation|
67:         if first
68:           first = false
69:         else
70:           out << "\n"
71:         end
72:         out << '[ '
73:         firstR = true
74:         allocation.candidates.each do |resource|
75:           if firstR
76:             firstR = false
77:           else
78:             out << ', '
79:           end
80:           out << resource.fullId
81:         end
82:         modes = %(order lowprob lowload hiload random)
83:         out << " ] select by #{modes[allocation.selectionMode]} "
84:         out << 'mandatory ' if allocation.mandatory
85:         out << 'persistent ' if allocation.persistent
86:       end
87:       out
88:     end
to_tjp() click to toggle source
    # File lib/Attributes.rb, line 54
54:     def to_tjp
55:       out = []
56:       @value.each do |allocation|
57:         out.push("allocate #{allocation.to_tjp}\n")
58:         # TODO: incomplete
59:       end
60:       out
61:     end

Disabled; run with --debug to generate this.

[Validate]

Generated with the Darkfish Rdoc Generator 1.1.6.