Class: TaskJuggler::DateAttribute

Inherits:
AttributeBase show all
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

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

.tjpIdObject



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