Class: FeedParser::Feed
- Inherits:
-
Object
- Object
- FeedParser::Feed
- Defined in:
- lib/feedparser/feed.rb
Instance Attribute Summary collapse
-
#authors ⇒ Object
Returns the value of attribute authors.
-
#feed_url ⇒ Object
Returns the value of attribute feed_url.
-
#format ⇒ Object
e.g.
-
#generator ⇒ Object
Returns the value of attribute generator.
-
#items ⇒ Object
Returns the value of attribute items.
-
#published ⇒ Object
e.g.
-
#published_local ⇒ Object
“unparsed” local datetime as in feed (NOT converted to utc).
-
#published_text ⇒ Object
(also: #published_line)
string version of date.
-
#summary ⇒ Object
(also: #description, #subtitle)
e.g.
-
#tags ⇒ Object
(also: #categories)
Returns the value of attribute tags.
-
#title ⇒ Object
Returns the value of attribute title.
-
#updated ⇒ Object
e.g.
-
#updated_local ⇒ Object
“unparsed” local datetime as in feed (NOT converted to utc).
-
#updated_text ⇒ Object
(also: #updated_line)
string version of date.
-
#url ⇒ Object
todo - add alias site_url/home_page_url/page_url - why? why not??.
Instance Method Summary collapse
-
#author ⇒ Object
add author shortcut e.g.
- #authors? ⇒ Boolean (also: #author?)
-
#initialize ⇒ Feed
constructor
A new instance of Feed.
- #published? ⇒ Boolean
- #summary? ⇒ Boolean (also: #description?, #subtitle?)
- #tags? ⇒ Boolean
- #updated? ⇒ Boolean
Constructor Details
Instance Attribute Details
#authors ⇒ Object
Returns the value of attribute authors.
15 16 17 |
# File 'lib/feedparser/feed.rb', line 15 def @authors end |
#feed_url ⇒ Object
Returns the value of attribute feed_url.
10 11 12 |
# File 'lib/feedparser/feed.rb', line 10 def feed_url @feed_url end |
#format ⇒ Object
e.g. atom|rss 2.0|json etc.
7 8 9 |
# File 'lib/feedparser/feed.rb', line 7 def format @format end |
#generator ⇒ Object
Returns the value of attribute generator.
70 71 72 |
# File 'lib/feedparser/feed.rb', line 70 def generator @generator end |
#items ⇒ Object
Returns the value of attribute items.
13 14 15 |
# File 'lib/feedparser/feed.rb', line 13 def items @items end |
#published ⇒ Object
e.g. pubDate (rss)n/a (atom) – note: published is basically an alias for created
63 64 65 |
# File 'lib/feedparser/feed.rb', line 63 def published @published end |
#published_local ⇒ Object
“unparsed” local datetime as in feed (NOT converted to utc)
64 65 66 |
# File 'lib/feedparser/feed.rb', line 64 def published_local @published_local end |
#published_text ⇒ Object Also known as: published_line
string version of date
66 67 68 |
# File 'lib/feedparser/feed.rb', line 66 def published_text @published_text end |
#summary ⇒ Object Also known as: description, subtitle
e.g. description (rss)|subtitle (atom)
33 34 35 |
# File 'lib/feedparser/feed.rb', line 33 def summary @summary end |
#tags ⇒ Object Also known as: categories
Returns the value of attribute tags.
25 26 27 |
# File 'lib/feedparser/feed.rb', line 25 def @tags end |
#title ⇒ Object
Returns the value of attribute title.
8 9 10 |
# File 'lib/feedparser/feed.rb', line 8 def title @title end |
#updated ⇒ Object
e.g. lastBuildDate (rss)|updated (atom) – always (converted) to utc
56 57 58 |
# File 'lib/feedparser/feed.rb', line 56 def updated @updated end |
#updated_local ⇒ Object
“unparsed” local datetime as in feed (NOT converted to utc)
57 58 59 |
# File 'lib/feedparser/feed.rb', line 57 def updated_local @updated_local end |
#updated_text ⇒ Object Also known as: updated_line
string version of date
59 60 61 |
# File 'lib/feedparser/feed.rb', line 59 def updated_text @updated_text end |
#url ⇒ Object
todo - add alias site_url/home_page_url/page_url - why? why not??
9 10 11 |
# File 'lib/feedparser/feed.rb', line 9 def url @url end |
Instance Method Details
#author ⇒ Object
add author shortcut e.g. equals authors - for now only read only
fix: also add author= why? why not???
22 |
# File 'lib/feedparser/feed.rb', line 22 def () @authors[0]; end |
#authors? ⇒ Boolean Also known as:
16 |
# File 'lib/feedparser/feed.rb', line 16 def () @authors && @authors.size > 0; end |
#published? ⇒ Boolean
62 |
# File 'lib/feedparser/feed.rb', line 62 def published?() @published.nil? == false; end |
#summary? ⇒ Boolean Also known as: description?, subtitle?
32 |
# File 'lib/feedparser/feed.rb', line 32 def summary?() @summary.nil? == false; end |
#tags? ⇒ Boolean
26 |
# File 'lib/feedparser/feed.rb', line 26 def () @tags && @tags.size > 0; end |
#updated? ⇒ Boolean
55 |
# File 'lib/feedparser/feed.rb', line 55 def updated?() @updated.nil? == false; end |