Class: TaskJuggler::ReferenceAttribute
Instance Attribute Summary
#inherited, #property, #provided, #type
Class Method Summary
collapse
Instance Method Summary
collapse
#get, #id, #inherit, isList?, #isList?, mode, #name, #nil?, #reset, #set, setMode, #to_num, #to_sort
Constructor Details
#initialize(property, type, container) ⇒ ReferenceAttribute
Returns a new instance of ReferenceAttribute.
449
450
451
|
# File 'lib/taskjuggler/Attributes.rb', line 449
def initialize(property, type, container)
super
end
|
Class Method Details
453
454
455
|
# File 'lib/taskjuggler/Attributes.rb', line 453
def ReferenceAttribute::tjpId
'reference'
end
|
Instance Method Details
476
477
478
|
# File 'lib/taskjuggler/Attributes.rb', line 476
def label
(v = get) ? (v[1] ? v[1][0] : v[0]) : nil
end
|
#to_rti(query) ⇒ Object
461
462
463
464
465
466
|
# File 'lib/taskjuggler/Attributes.rb', line 461
def to_rti(query)
return nil unless get
rText = RichText.new("[#{url} #{label}]")
rText.generateIntermediateFormat
end
|
#to_s(query = nil) ⇒ Object
457
458
459
|
# File 'lib/taskjuggler/Attributes.rb', line 457
def to_s(query = nil)
url || ''
end
|
468
469
470
|
# File 'lib/taskjuggler/Attributes.rb', line 468
def to_tjp
"#{@type.id} \"#{url}\"#{label ? " { label \"#{label}\" }" : ''}"
end
|
472
473
474
|
# File 'lib/taskjuggler/Attributes.rb', line 472
def url
(v = get) ? v[0] : nil
end
|