class TaskJuggler::ReferenceAttribute

Public Class Methods

new(property, type, container) click to toggle source
Calls superclass method TaskJuggler::AttributeBase.new
# File lib/taskjuggler/Attributes.rb, line 448
def initialize(property, type, container)
  super
end
tjpId() click to toggle source
# File lib/taskjuggler/Attributes.rb, line 452
def ReferenceAttribute::tjpId
  'reference'
end

Public Instance Methods

label() click to toggle source
# File lib/taskjuggler/Attributes.rb, line 475
def label
  (v = get) ? (v[1] ? v[1][0] : v[0]) : nil
end
to_rti(query) click to toggle source
# File lib/taskjuggler/Attributes.rb, line 460
def to_rti(query)
  return nil unless get

  rText = RichText.new("[#{url} #{label}]")
  rText.generateIntermediateFormat
end
to_s(query = nil) click to toggle source
# File lib/taskjuggler/Attributes.rb, line 456
def to_s(query = nil)
  url || ''
end
to_tjp() click to toggle source
# File lib/taskjuggler/Attributes.rb, line 467
def to_tjp
  "#{@type.id} \"#{url}\"#{label ? " { label \"#{label}\" }" : ''}"
end
url() click to toggle source
# File lib/taskjuggler/Attributes.rb, line 471
def url
  (v = get) ? v[0] : nil
end