Parent

Methods

CalendarsServlet

Public Instance Methods

do_GET(req, resp) click to toggle source
# File lib/vpim/agent/main.rb, line 247
  def do_GET(req, resp)
    body = ''
#   body << @options.inspect

    folder = *@options

    # TODO Should be longer lived
    repo = Vpim::Repo::Apple3.new($ical_folder)
    rest = Vpim::Agent::Calendars.new(repo)
    path = Vpim::Agent::Path.new(req.request_uri, req.path)

    begin
      body, form = rest.get(path)
      status = 200
    rescue Vpim::Agent::NotFound
      body = $!.to_s
      form = "text/plain" # should be HTML!
      status = 404
    end

    resp.status = status
    resp.body = body
    resp['content-type'] = form
  end

[Validate]

Generated with the Darkfish Rdoc Generator 2.