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.
249 250 251 |
# File 'lib/taskjuggler/Attributes.rb', line 249 def initialize(property, type, container) super end |
Class Method Details
.tjpId ⇒ Object
253 254 255 |
# File 'lib/taskjuggler/Attributes.rb', line 253 def DurationAttribute::tjpId 'duration' end |
Instance Method Details
#to_s(query = nil) ⇒ Object
261 262 263 264 |
# File 'lib/taskjuggler/Attributes.rb', line 261 def to_s(query = nil) query ? query.scaleDuration(query.project.slotsToDays(get)) : get.to_s end |
#to_tjp ⇒ Object
257 258 259 |
# File 'lib/taskjuggler/Attributes.rb', line 257 def to_tjp @type.id + ' ' + get.to_s + 'h' end |