©2009 Rick DeNatale, All rights reserved. Refer to the file README.txt for the license
to see the property accessing methods for this class see the RiCal::Properties::Calendar module
add an event to the calendar
# File lib/ri_cal/component/calendar.rb, line 68 def add_subcomponent(component) super(component) component.add_date_times_to(required_timezones) if tz_info_source? end
Return the default time zone identifier for this calendar
# File lib/ri_cal/component/calendar.rb, line 52 def default_tzid @default_tzid || PropertyValue::DateTime.default_tzid end
Set the default time zone identifier for this calendar To set the default to floating times use a value of :floating
# File lib/ri_cal/component/calendar.rb, line 58 def default_tzid=(value) @default_tzid=value end
return an array of event components contained within this Calendar
# File lib/ri_cal/component/calendar.rb, line 63 def events subcomponents["VEVENT"] end
Export this calendar as an iCalendar file. if to is nil (the default) then this method will return a string, otherwise to should be an IO to which the iCalendar file contents will be written
# File lib/ri_cal/component/calendar.rb, line 230 def export(to=nil) export_stream = FoldingStream.new(to) export_stream.puts("BEGIN:VCALENDAR") export_properties_to(export_stream) export_x_properties_to(export_stream) export_required_timezones(export_stream) export_subcomponent_to(export_stream, events) export_subcomponent_to(export_stream, todos) export_subcomponent_to(export_stream, journals) export_subcomponent_to(export_stream, freebusys) subcomponents.each do |key, value| unless %{VEVENT VTODO VJOURNAL VFREEBUSYS}.include?(key) export_subcomponent_to(export_stream, value) end end export_stream.puts("END:VCALENDAR") if to nil else export_stream.string end end
return an array of freebusy components contained within this Calendar
# File lib/ri_cal/component/calendar.rb, line 84 def freebusys subcomponents["VFREEBUSY"] end
return an array of journal components contained within this Calendar
# File lib/ri_cal/component/calendar.rb, line 79 def journals subcomponents["VJOURNAL"] end
return an array of timezone components contained within this calendar
# File lib/ri_cal/component/calendar.rb, line 108 def timezones subcomponents["VTIMEZONE"] end
return an array of todo components contained within this Calendar
# File lib/ri_cal/component/calendar.rb, line 74 def todos subcomponents["VTODO"] end
Generated with the Darkfish Rdoc Generator 2.