Class: TaskJuggler::DateAttribute
- Inherits:
-
AttributeBase
- Object
- AttributeBase
- TaskJuggler::DateAttribute
- 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) ⇒ DateAttribute
constructor
A new instance of DateAttribute.
- #to_s(query = nil) ⇒ Object
Methods inherited from AttributeBase
#get, #id, #inherit, isList?, #isList?, mode, #name, #nil?, #reset, #set, setMode, #to_num, #to_rti, #to_sort, #to_tjp
Constructor Details
#initialize(property, type, container) ⇒ DateAttribute
Returns a new instance of DateAttribute.
201 202 203 |
# File 'lib/taskjuggler/Attributes.rb', line 201 def initialize(property, type, container) super end |
Class Method Details
.tjpId ⇒ Object
213 214 215 |
# File 'lib/taskjuggler/Attributes.rb', line 213 def DateAttribute::tjpId 'date' end |
Instance Method Details
#to_s(query = nil) ⇒ Object
205 206 207 208 209 210 211 |
# File 'lib/taskjuggler/Attributes.rb', line 205 def to_s(query = nil) if (v = get) v.to_s(query ? query.timeFormat : '%Y-%m-%d') else 'Error' end end |