Vpim::Icalendar::Property::Common

Properties common to Vevent, Vtodo, and Vjournal.

Public Instance Methods

access_class() click to toggle source

This property defines the access classification for a calendar component.

An access classification is only one component of the general security system within a calendar application. It provides a method of capturing the scope of the access the calendar owner intends for information within an individual calendar entry. The access classification of an individual iCalendar component is useful when measured along with the other security components of a calendar system (e.g., calendar user authentication, authorization, access rights, access role, etc.). Hence, the semantics of the individual access classifications cannot be completely defined by this memo alone. Additionally, due to the "blind" nature of most exchange processes using this memo, these access classifications cannot serve as an enforcement statement for a system receiving an iCalendar object. Rather, they provide a method for capturing the intention of the calendar owner for the access to the calendar component.

Property Name: CLASS

Property Value: one of "PUBLIC", "PRIVATE", "CONFIDENTIAL", default is "PUBLIC" if no CLASS property is found.

# File lib/vpim/property/common.rb, line 41
def access_class
  proptoken 'CLASS', ["PUBLIC", "PRIVATE", "CONFIDENTIAL"], "PUBLIC"
end
attachments() click to toggle source

An Array of attachments, see Attachment for more information.

# File lib/vpim/property/common.rb, line 169
def attachments
  @properties.enum_by_name('ATTACH').map do |f|
    attachment = Attachment.decode(f, 'uri', 'FMTTYPE')
  end
end
attendee?(uri) click to toggle source

Return true if the uri, usually a mailto: URI, is an attendee.

# File lib/vpim/property/common.rb, line 141
def attendee?(uri)
  attendees.include? uri
end
attendees(uri = nil) click to toggle source

Return an array of attendees, an empty array if there are none. The attendees are objects of Icalendar::Address. If uri is specified only the return the attendees with this uri.

# File lib/vpim/property/common.rb, line 130
def attendees(uri = nil)
  attendees = @properties.enum_by_name('ATTENDEE').map { |a| Icalendar::Address.decode(a) }
  attendees.freeze
  if uri
    attendees.select { |a| a == uri }
  else
    attendees
  end
end
categories() click to toggle source

This property defines the categories for a calendar component.

Property Name: CATEGORIES

Value Type: TEXT

Ruby Type: Array of String

This property is used to specify categories or subtypes of the calendar component. The categories are useful in searching for a calendar component of a particular type and category.

# File lib/vpim/property/common.rb, line 156
def categories
  proptextlistarray 'CATEGORIES'
end
comments() click to toggle source
# File lib/vpim/property/common.rb, line 160
def comments
  proptextarray 'COMMENT'
end
contacts() click to toggle source
# File lib/vpim/property/common.rb, line 164
def contacts
  proptextarray 'CONTACT'
end
created() click to toggle source
# File lib/vpim/property/common.rb, line 45
def created
  proptime 'CREATED'
end
description() click to toggle source

Description of the calendar component, or nil if there is no description.

# File lib/vpim/property/common.rb, line 51
def description
  proptext 'DESCRIPTION'
end
dtstamp() click to toggle source

The time stamp for this calendar component.

# File lib/vpim/property/common.rb, line 62
def dtstamp
  proptime 'DTSTAMP'
end
dtstart() click to toggle source

The start time for this calendar component.

# File lib/vpim/property/common.rb, line 67
def dtstart
  proptime 'DTSTART'
end
lastmod() click to toggle source
# File lib/vpim/property/common.rb, line 71
def lastmod
  proptime 'LAST-MODIFIED'
end
organizer() click to toggle source

Return the event organizer, an object of Icalendar::Address (or nil if there is no ORGANIZER field).

# File lib/vpim/property/common.rb, line 77
def organizer
  organizer = @properties.field('ORGANIZER')

  if organizer
    organizer = Icalendar::Address.decode(organizer)
  end

  organizer.freeze
end
sequence() click to toggle source

Revision sequence number of the calendar component, or nil if there is no SEQUENCE; property.

# File lib/vpim/property/common.rb, line 57
def sequence
  propinteger 'SEQUENCE'
end
status() click to toggle source

recurid seq

# Status values are not rejected during decoding. However, if the # status is requested, and it's value is not one of the defined # allowable values, an exception is raised.

# File lib/vpim/property/common.rb, line 95
def status
  case self
  when Vpim::Icalendar::Vevent
    proptoken 'STATUS', ['TENTATIVE', 'CONFIRMED', 'CANCELLED']

  when Vpim::Icalendar::Vtodo
    proptoken 'STATUS', ['NEEDS-ACTION', 'COMPLETED', 'IN-PROCESS', 'CANCELLED']

  when Vpim::Icalendar::Vevent
    proptoken 'STATUS', ['DRAFT', 'FINAL', 'CANCELLED']
  end
end
summary() click to toggle source

Summary description of the calendar component, or nil if there is no SUMMARY property.

# File lib/vpim/property/common.rb, line 114
def summary
  proptext 'SUMMARY'
end
uid() click to toggle source

The unique identifier of this calendar component, a string.

# File lib/vpim/property/common.rb, line 119
def uid
  proptext 'UID'
end
url() click to toggle source
# File lib/vpim/property/common.rb, line 123
def url
  propvalue 'URL'
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.