Class: TaskJuggler::DurationAttribute
- Inherits:
-
AttributeBase
- Object
- AttributeBase
- TaskJuggler::DurationAttribute
- Defined in:
- lib/taskjuggler/Attributes.rb
Instance Attribute Summary
Attributes inherited from AttributeBase
#inherited, #property, #provided, #type
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(property, type, container) ⇒ DurationAttribute
constructor
A new instance of DurationAttribute.
- #to_s(query = nil) ⇒ Object
- #to_tjp ⇒ Object
Methods inherited from AttributeBase
#get, #id, #inherit, isList?, #isList?, mode, #name, #nil?, #reset, #set, setMode, #to_num, #to_rti, #to_sort
Constructor Details
#initialize(property, type, container) ⇒ DurationAttribute
Returns a new instance of DurationAttribute.
248 249 250 |
# File 'lib/taskjuggler/Attributes.rb', line 248 def initialize(property, type, container) super end |
Class Method Details
.tjpId ⇒ Object
252 253 254 |
# File 'lib/taskjuggler/Attributes.rb', line 252 def DurationAttribute::tjpId 'duration' end |
Instance Method Details
#to_s(query = nil) ⇒ Object
260 261 262 263 |
# File 'lib/taskjuggler/Attributes.rb', line 260 def to_s(query = nil) query ? query.scaleDuration(query.project.slotsToDays(get)) : get.to_s end |
#to_tjp ⇒ Object
256 257 258 |
# File 'lib/taskjuggler/Attributes.rb', line 256 def to_tjp @type.id + ' ' + get.to_s + 'h' end |