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 568
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 574
def ShiftAssignmentsAttribute::tjpId
  'shifts'
end

Public Instance Methods

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