class Vpim::Agent::Calendars::Calendar
Public Class Methods
new(cal)
click to toggle source
# File lib/vpim/agent/calendars.rb, line 126 def initialize(cal) @cal = cal @list = ResourceList.new( "Calendar #{@cal.name.inspect}:", [ ["calendar", "download"], ["calendar", "subscription", "webcal"], ["atom", "syndication"], ] ) end
Public Instance Methods
get(path)
click to toggle source
# File lib/vpim/agent/calendars.rb, line 138 def get(path) form = path.shift # TODO should redirect to an object, so that extra paths can be # handled more gracefully. case form when nil return @list.get(path) when "calendar" return @cal.encode, Form::ICS when "atom" return Atomize.calendar(@cal, path.uri, nil, @cal.name).to_xml, Form::ATOM else raise NotFound.new(form, path) end end