Class: Vpim::Icalendar::Vjournal
- Inherits:
-
Object
- Object
- Vpim::Icalendar::Vjournal
- Includes:
- Property::Base, Property::Common, Property::Recurrence
- Defined in:
- lib/vpim/vjournal.rb
Class Method Summary collapse
-
.create(fields = []) ⇒ Object
Create a Vjournal component.
Instance Method Summary collapse
-
#fields ⇒ Object
TODO - derive everything from Icalendar::Component to get rid of this kind of stuff?.
-
#initialize(fields) ⇒ Vjournal
constructor
:nodoc:.
-
#properties ⇒ Object
:nodoc:.
Methods included from Property::Recurrence
#occurrences, #occurs_in?, #rdates, #rrule
Methods included from Property::Common
#access_class, #attachments, #attendee?, #attendees, #categories, #comments, #contacts, #created, #description, #dtstamp, #dtstart, #lastmod, #organizer, #sequence, #status, #summary, #uid, #url
Methods included from Property::Base
#propduration, #propend, #propinteger, #proptext, #proptextarray, #proptextlistarray, #proptime, #proptoken, #propvalue, #propvaluearray
Constructor Details
#initialize(fields) ⇒ Vjournal
:nodoc:
26 27 28 29 30 31 32 |
# File 'lib/vpim/vjournal.rb', line 26 def initialize(fields) #:nodoc: outer, inner = Vpim.outer_inner(fields) @properties = Vpim::DirectoryInfo.create(outer) @elements = inner end |
Class Method Details
.create(fields = []) ⇒ Object
Create a Vjournal component.
47 48 49 50 51 52 53 |
# File 'lib/vpim/vjournal.rb', line 47 def self.create(fields=[]) di = DirectoryInfo.create([], 'VJOURNAL') Vpim::DirectoryInfo::Field.create_array(fields).each { |f| di.push_unique f } new(di.to_a) end |
Instance Method Details
#fields ⇒ Object
TODO - derive everything from Icalendar::Component to get rid of this kind of stuff?
35 36 37 38 39 40 |
# File 'lib/vpim/vjournal.rb', line 35 def fields #:nodoc: f = properties.to_a last = f.pop f.push @elements f.push last end |
#properties ⇒ Object
:nodoc:
42 43 44 |
# File 'lib/vpim/vjournal.rb', line 42 def properties #:nodoc: @properties end |