Permalink
Browse files

Collection#feed

attaches a Feed to Collections

darcs-hash:20080325014429-ce558-33cadf594df89a163d16408dbbdfea1b7331bebf.gz
  • Loading branch information...
1 parent 389b57f commit 7ff03a9c62b35d5545596dc28a991728947619cd @bct committed Mar 25, 2008
Showing with 8 additions and 0 deletions.
  1. +8 −0 lib/atom/collection.rb
View
@@ -42,6 +42,10 @@ class Collection < Atom::Element
elements ['app', PP_NS], :categories, :categories, Atom::Categories
+ def title
+ @title or @feed.title
+ end
+
def accepts
if @accepts.empty?
['application/atom+xml;type=entry']
@@ -56,11 +60,15 @@ def accepts= array
attr_reader :http
+ attr_reader :feed
+
def initialize(href = '', http = Atom::HTTP.new)
super()
@href = href
@http = http
+
+ @feed = Atom::Feed.new @href, http
end
# POST an entry to the collection, with an optional slug

0 comments on commit 7ff03a9

Please sign in to comment.