Class: Icalendar::Component

Class | Icalendar::Component
In: | lib/icalendar/component.rb
Parent: | Icalendar::Base

The body of the iCalendar object consists of a sequence of calendar properties and one or more calendar components. The calendar properties are attributes that apply to the calendar as a whole. The calendar components are collections of properties that express a particular calendar semantic. For example, the calendar component can specify an Event, a Todo, a Journal entry, Timezone information, or Freebusy time information, or an Alarm.

### Methods

add add_component add_event add_journal add_sliced_text add_todo custom_property escape_chars ical_component ical_multi_property ical_multiline_property ical_property multi_property? multiline_property? new new_uid print_component print_parameters print_properties remove remove_component remove_event remove_journal remove_todo respond_to? to_ical

### Attributes

name | [R] |
properties | [RW] |

### Public Class methods

new(name)

### Protected Class methods

ical_component(*syms)

Make it protected so we can monitor usage…

ical_multi_property(property, singular, plural)

Define a set of methods defining a new property, which supports multiple values for the same property name.

ical_multiline_property(property, singular, plural)

Define a set of methods defining a new property, which supports multiple values in multiple lines with same property name

ical_property(property, alias_name = nil, prop_name = nil)

Define a set of methods supporting a new property

### Public Instance methods

add(component)

Alias for add_component

add_component(component)

Add a sub-component to the current component object.

add_event(component)

Alias for add_component

add_journal(component)

Alias for add_component

add_sliced_text(add_to,escaped)
add_todo(component)

Alias for add_component

custom_property(name, value)

TODO: Look into the x-property, x-param stuff… This would really only be needed for subclassing to add additional properties to an application using the API.

escape_chars(value)
multi_property?(name)
multiline_property?(name)
new_uid()

Used to generate unique component ids

print_component() {|+| ...}

Print this icalendar component

print_parameters(val)

Print the parameters for a specific property

print_properties()

Print this components properties

remove(component)

Alias for remove_component

remove_component(component)
remove_event(component)

Alias for remove_component

remove_journal(component)

Alias for remove_component

remove_todo(component)

Alias for remove_component

respond_to?(method_name)
to_ical()

Output in the icalendar format

[Validate]