lib/vpim/vjournal.rb in vpim-0.619 vs lib/vpim/vjournal.rb in vpim-0.658

- old
+ new

@@ -28,9 +28,21 @@ @properties = Vpim::DirectoryInfo.create(outer) @elements = inner end + # TODO - derive everything from Icalendar::Component to get rid of 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 Vjournal component. def self.create(fields=[]) di = DirectoryInfo.create([], 'VJOURNAL') Vpim::DirectoryInfo::Field.create_array(fields).each { |f| di.push_unique f }