Class: Vpim::Icalendar::Vjournal

Inherits:
Object
  • Object
show all
Includes:
Property::Base, Property::Common, Property::Recurrence
Defined in:
lib/vpim/vjournal.rb

Class Method Summary collapse

Instance Method Summary collapse

Methods included from Property::Recurrence

#occurences, #occurs_in?, #rdates

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

#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.



34
35
36
37
38
39
40
# File 'lib/vpim/vjournal.rb', line 34

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