Class
Defines a top-level Atom
Entry
element, used as the document element of a stand-alone Atom
Entry
Document. It has the following attributes:
-
author
-
category
-
categories
-
content
-
contributor
-
id
-
link
-
published
-
rights
-
source
-
summary
-
title
-
updated
Reference: validator.w3.org/feed/docs/rfc4287.html#element.entry]
Constants
Feed::Entry::Author
Feed::Entry::Category
Feed::Entry::Contributor
Feed::Entry::Id
Feed::Entry::Link
Feed::Entry::Rights
Feed::Entry::Title
Feed::Entry::Updated
Class Methods
lib/rss/atom.rb
View on GitHub
# File tmp/rubies/ruby-2.6.10/lib/rss/atom.rb, line 922
def initialize(version=nil, encoding=nil, standalone=nil)
super("1.0", version, encoding, standalone)
@feed_type = "atom"
@feed_subtype = "entry"
end
Instance Methods
lib/rss/atom.rb
View on GitHub
# File tmp/rubies/ruby-2.6.10/lib/rss/atom.rb, line 947
def atom_validate(ignore_unknown_element, tags, uri)
unless have_author?
raise MissingTagError.new("author", tag_name)
end
validate_duplicate_links(links)
end
No documentation available
lib/rss/atom.rb
View on GitHub
# File tmp/rubies/ruby-2.6.10/lib/rss/atom.rb, line 941
def have_author?
authors.any? {|author| !author.to_s.empty?} or
(source and source.have_author?)
end
Returns where there are any authors present or there is a source with an author.
lib/rss/atom.rb
View on GitHub
# File tmp/rubies/ruby-2.6.10/lib/rss/atom.rb, line 954
def have_required_elements?
super and have_author?
end
No documentation available
#
lib/rss/atom.rb
View on GitHub
# File tmp/rubies/ruby-2.6.10/lib/rss/atom.rb, line 929
def items
[self]
end
Returns the Entry
in an array.
lib/rss/atom.rb
View on GitHub
# File tmp/rubies/ruby-2.6.10/lib/rss/atom.rb, line 958
def maker_target(maker)
maker.items.new_item
end
No documentation available
lib/rss/atom.rb
View on GitHub
# File tmp/rubies/ruby-2.6.10/lib/rss/atom.rb, line 934
def setup_maker(maker)
maker = maker.maker if maker.respond_to?("maker")
super(maker)
end
Sets up the maker
for constructing Entry
elements.