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:
25 26 27 28 29 30 31 |
# File 'lib/vpim/vjournal.rb', line 25 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.
46 47 48 49 50 51 52 |
# File 'lib/vpim/vjournal.rb', line 46 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?
34 35 36 37 38 39 |
# File 'lib/vpim/vjournal.rb', line 34 def fields #:nodoc: f = properties.to_a last = f.pop f.push @elements f.push last end |
#properties ⇒ Object
:nodoc:
41 42 43 |
# File 'lib/vpim/vjournal.rb', line 41 def properties #:nodoc: @properties end |