class TaskJuggler::ShiftAssignmentsAttribute

Public Class Methods

new(property, type, container) click to toggle source
Calls superclass method TaskJuggler::AttributeBase::new
# File lib/taskjuggler/Attributes.rb, line 569
def initialize(property, type, container)
  super
  v = get
  v.project = property.project if v
end
tjpId() click to toggle source
# File lib/taskjuggler/Attributes.rb, line 575
def ShiftAssignmentsAttribute::tjpId
  'shifts'
end

Public Instance Methods

to_tjp() click to toggle source
# File lib/taskjuggler/Attributes.rb, line 579
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