Index: vendor/vpim/icalendar.rb =================================================================== --- vendor/vpim/icalendar.rb (revision 1028) +++ vendor/vpim/icalendar.rb (working copy) @@ -255,6 +255,8 @@ case component when Vevent @vevents << component + when Vtodo + @vtodos << component else raise ArgumentError, "can't add component type #{component.type} to a calendar" end Index: vendor/vpim/vevent.rb =================================================================== --- vendor/vpim/vevent.rb (revision 1028) +++ vendor/vpim/vevent.rb (working copy) @@ -76,7 +76,22 @@ attr_reader :description, :summary, :comment, :location attr_reader :properties, :fields # :nodoc: + def Vtodo.create(fields=[]) + start = [] + + case fields + when Hash + fields.each do |name,value| + start << DirectoryInfo::Field.create( name, value ) + end + else + start.concat fields + end + di = DirectoryInfo.create(start, 'VTODO') + new(di.to_a) + end + =begin I think that the initialization shouldn't be done in the #initialize, so, for example, @status = @properties.text('STATUS').first