Class TaskJuggler::ShiftAssignmentsAttribute
In: lib/taskjuggler/Attributes.rb
Parent: AttributeBase

Methods

new   tjpId   to_tjp  

Public Class methods

[Source]

# File lib/taskjuggler/Attributes.rb, line 575
    def initialize(property, type, container)
      super
      v = get
      v.project = property.project if v
    end

[Source]

# File lib/taskjuggler/Attributes.rb, line 581
    def ShiftAssignmentsAttribute::tjpId
      'shifts'
    end

Public Instance methods

[Source]

# File lib/taskjuggler/Attributes.rb, line 585
    def to_tjp
      v = get
      first = true
      str = 'shifts '
      v.assignments.each do |sa|
        if first
          first = false
        else
          str += ",\n"
        end

        str += "#{sa.shiftScenario.property.fullId} #{sa.interval}"
      end

      str
    end

[Validate]