In Files

  • rss-0.2.9/lib/rss/atom.rb
  • rss-0.2.9/lib/rss/dublincore/atom.rb

Class/Module Index [+]

Quicksearch

RSS::Atom::Feed

Defines the top-level element of an Atom Feed Document. It consists of a number of children Entry elements, and has the following attributes:

  • author

  • categories

  • category

  • content

  • contributor

  • entries (aliased as items)

  • entry

  • generator

  • icon

  • id

  • link

  • logo

  • rights

  • subtitle

  • title

  • updated

Reference: validator.w3.org/feed/docs/rfc4287.html#element.feed

Public Class Methods

new(version=nil, encoding=nil, standalone=nil) click to toggle source

Creates a new Atom feed

 
               # File rss-0.2.9/lib/rss/atom.rb, line 313
def initialize(version=nil, encoding=nil, standalone=nil)
  super("1.0", version, encoding, standalone)
  @feed_type = "atom"
  @feed_subtype = "feed"
end
            

Public Instance Methods

have_author?() click to toggle source

Returns true if there are any authors for the feed or any of the Entry child elements have an author

 
               # File rss-0.2.9/lib/rss/atom.rb, line 323
def have_author?
  authors.any? {|author| !author.to_s.empty?} or
    entries.any? {|entry| entry.have_author?(false)}
end