class Vpim::Agent::ResourceList

Return an HTML description of a list of resources accessible under this path.

Public Class Methods

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

Public Instance Methods

get(path) click to toggle source
# File lib/vpim/agent/calendars.rb, line 96
      def get(path)
        return "<html><body>
#{@description}
<ul>
  #{
    @items.map do |name,description,scheme|
      "<li><a href=\"#{path.append(name,scheme)}\">#{description || name}</a></li>\n"
    end
  }
</ul>
</body></html>
", Form::HTML
      end