Parent

Methods

Vpim::Agent::Calendars

Return calendar information based on RESTful (lovein’ the jargon…) paths. Input is a Vpim::Repo.

.../coding/month/atom
.../coding/events/month/ics              <- next month?
.../coding/events/month/2008-04/ics      <- a specified month?
.../coding/week/atom
.../year/atom

Public Class Methods

new(repo) click to toggle source
# File lib/vpim/agent/calendars.rb, line 122
def initialize(repo)
  @repo = repo
end

Public Instance Methods

get(path) click to toggle source

Get object at this path. Return value is a tuple of data and mime content type.

# File lib/vpim/agent/calendars.rb, line 158
def get(path)
  case name = path.to_path.shift
  when nil
    list = ResourceList.new("Calendars:", @repo.map{|c| c.name})
    return list.get(path)
  else
    if cal = @repo.find{|c| c.name == name}
      return Calendar.new(cal).get(path)
    else
      raise NotFound.new(name, path)
    end
  end
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.