Class: Vpim::Agent::ResourceList
- Inherits:
-
Object
- Object
- Vpim::Agent::ResourceList
- Defined in:
- lib/vpim/agent/calendars.rb
Overview
Return an HTML description of a list of resources accessible under this path.
Instance Method Summary collapse
- #get(path) ⇒ Object
-
#initialize(description, items) ⇒ ResourceList
constructor
A new instance of ResourceList.
Constructor Details
#initialize(description, items) ⇒ ResourceList
Returns a new instance of ResourceList.
92 93 94 95 |
# File 'lib/vpim/agent/calendars.rb', line 92 def initialize(description, items) @description = description @items = items end |
Instance Method Details
#get(path) ⇒ Object
97 98 99 100 101 102 103 104 105 106 107 108 109 110 |
# File 'lib/vpim/agent/calendars.rb', line 97 def get(path) return <<__, Form::HTML <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> __ end |