class RSS::Atom::Entry
定义顶级的 Atom
Entry
元素,用作独立的 Atom
Entry
文档的文档元素。它具有以下属性:
-
author
-
category
-
categories
-
content
-
contributor
-
id
-
link
-
published
-
rights
-
source
-
summary
-
title
-
updated
常量
- Author
Feed::Entry::Author
- Category
Feed::Entry::Category
- Content
- Contributor
Feed::Entry::Contributor
- Id
Feed::Entry::Id
- Link
Feed::Entry::Link
- Published
- Rights
Feed::Entry::Rights
- Source
- Summary
- Title
Feed::Entry::Title
- Updated
Feed::Entry::Updated
公共类方法
new(version=nil, encoding=nil, standalone=nil) 点击切换源码
调用父类方法
RSS::RootElementMixin::new
# File rss-0.3.1/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
公共实例方法
items() 点击切换源码
以数组形式返回 Entry
。
# File rss-0.3.1/lib/rss/atom.rb, line 929 def items [self] end
setup_maker(maker) 点击切换源码
设置 maker
以构造 Entry
元素。
# File rss-0.3.1/lib/rss/atom.rb, line 934 def setup_maker(maker) maker = maker.maker if maker.respond_to?("maker") super(maker) end
私有实例方法
atom_validate(ignore_unknown_element, tags, uri) 点击切换源码
# File rss-0.3.1/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
have_required_elements?() 点击切换源码
# File rss-0.3.1/lib/rss/atom.rb, line 954 def have_required_elements? super and have_author? end
maker_target(maker) 点击切换源码
# File rss-0.3.1/lib/rss/atom.rb, line 958 def maker_target(maker) maker.items.new_item end