lib/vpim/vtodo.rb in vpim-0.360 vs lib/vpim/vtodo.rb in vpim-0.597
- old
+ new
@@ -1,7 +1,7 @@
=begin
- Copyright (C) 2006 Sam Roberts
+ Copyright (C) 2008 Sam Roberts
This library is free software; you can redistribute it and/or modify it
under the same terms as the ruby language itself, see the file COPYING for
details.
=end
@@ -32,9 +32,21 @@
outer, inner = Vpim.outer_inner(fields)
@properties = Vpim::DirectoryInfo.create(outer)
@elements = inner
+ end
+
+ # TODO - derive everything from Icalendar::Component to get this kind of stuff?
+ def fields #:nodoc:
+ f = @properties.to_a
+ last = f.pop
+ f.push @elements
+ f.push last
+ end
+
+ def properties #:nodoc:
+ @properties
end
# Create a new Vtodo object.
#
# If specified, +fields+ must be either an array of Field objects to