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.



202
203
204
# File 'lib/taskjuggler/Attributes.rb', line 202

def initialize(property, type, container)
  super
end

Class Method Details

.tjpIdObject



214
215
216
# File 'lib/taskjuggler/Attributes.rb', line 214

def DateAttribute::tjpId
  'date'
end

Instance Method Details

#to_s(query = nil) ⇒ Object



206
207
208
209
210
211
212
# File 'lib/taskjuggler/Attributes.rb', line 206

def to_s(query = nil)
  if (v = get)
    v.to_s(query ? query.timeFormat : '%Y-%m-%d')
  else
    'Error'
  end
end