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

Namespace
Methods
H
N
Included Modules
Class Public methods
new(version=nil, encoding=nil, standalone=nil)

Creates a new Atom feed

# File 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
Instance Public methods
have_author?()

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

# File 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