Class: Feed
- Inherits:
-
Object
- Object
- Feed
- Defined in:
- lib/rss_parser.rb
Instance Attribute Summary collapse
-
#description ⇒ Object
Returns the value of attribute description.
-
#generator ⇒ Object
Returns the value of attribute generator.
-
#items ⇒ Object
Returns the value of attribute items.
-
#language ⇒ Object
Returns the value of attribute language.
-
#link ⇒ Object
Returns the value of attribute link.
-
#title ⇒ Object
Returns the value of attribute title.
Instance Method Summary collapse
-
#initialize(title, link, description) ⇒ Feed
constructor
A new instance of Feed.
- #item(params) ⇒ Object
Constructor Details
#initialize(title, link, description) ⇒ Feed
Returns a new instance of Feed.
12 13 14 15 16 17 |
# File 'lib/rss_parser.rb', line 12 def initialize(title, link, description) @title = title @link = link @description = description @items = [] end |
Instance Attribute Details
#description ⇒ Object
Returns the value of attribute description.
10 11 12 |
# File 'lib/rss_parser.rb', line 10 def description @description end |
#generator ⇒ Object
Returns the value of attribute generator.
10 11 12 |
# File 'lib/rss_parser.rb', line 10 def generator @generator end |
#items ⇒ Object
Returns the value of attribute items.
9 10 11 |
# File 'lib/rss_parser.rb', line 9 def items @items end |
#language ⇒ Object
Returns the value of attribute language.
10 11 12 |
# File 'lib/rss_parser.rb', line 10 def language @language end |
#link ⇒ Object
Returns the value of attribute link.
10 11 12 |
# File 'lib/rss_parser.rb', line 10 def link @link end |
#title ⇒ Object
Returns the value of attribute title.
10 11 12 |
# File 'lib/rss_parser.rb', line 10 def title @title end |
Instance Method Details
#item(params) ⇒ Object
19 20 21 |
# File 'lib/rss_parser.rb', line 19 def item(params) @items << OpenStruct.new(params) end |