Class: BubbleWrap::RSSParser::RSSItem
- Inherits:
-
Object
- Object
- BubbleWrap::RSSParser::RSSItem
- Defined in:
- motion/rss_parser.rb
Overview
RSSItem is a simple class that holds all of RSS items. Extend this class to display/process the item differently.
Instance Attribute Summary collapse
-
#category ⇒ Object
Returns the value of attribute category.
-
#creator ⇒ Object
Returns the value of attribute creator.
-
#description ⇒ Object
Returns the value of attribute description.
-
#enclosure ⇒ Object
Returns the value of attribute enclosure.
-
#encoded ⇒ Object
Returns the value of attribute encoded.
-
#guid ⇒ Object
Returns the value of attribute guid.
-
#link ⇒ Object
Returns the value of attribute link.
-
#pubDate ⇒ Object
Returns the value of attribute pubDate.
-
#title ⇒ Object
Returns the value of attribute title.
Instance Method Summary collapse
-
#initialize ⇒ RSSItem
constructor
A new instance of RSSItem.
- #to_hash ⇒ Object
Constructor Details
#initialize ⇒ RSSItem
Returns a new instance of RSSItem.
33 34 35 |
# File 'motion/rss_parser.rb', line 33 def initialize @title, @description, @link, @pubDate, @guid, @creator, @category, @encoded = '', '', '', '', '' end |
Instance Attribute Details
#category ⇒ Object
Returns the value of attribute category.
31 32 33 |
# File 'motion/rss_parser.rb', line 31 def category @category end |
#creator ⇒ Object
Returns the value of attribute creator.
31 32 33 |
# File 'motion/rss_parser.rb', line 31 def creator @creator end |
#description ⇒ Object
Returns the value of attribute description.
31 32 33 |
# File 'motion/rss_parser.rb', line 31 def description @description end |
#enclosure ⇒ Object
Returns the value of attribute enclosure.
31 32 33 |
# File 'motion/rss_parser.rb', line 31 def enclosure @enclosure end |
#encoded ⇒ Object
Returns the value of attribute encoded.
31 32 33 |
# File 'motion/rss_parser.rb', line 31 def encoded @encoded end |
#guid ⇒ Object
Returns the value of attribute guid.
31 32 33 |
# File 'motion/rss_parser.rb', line 31 def guid @guid end |
#link ⇒ Object
Returns the value of attribute link.
31 32 33 |
# File 'motion/rss_parser.rb', line 31 def link @link end |
#pubDate ⇒ Object
Returns the value of attribute pubDate.
31 32 33 |
# File 'motion/rss_parser.rb', line 31 def pubDate @pubDate end |
#title ⇒ Object
Returns the value of attribute title.
31 32 33 |
# File 'motion/rss_parser.rb', line 31 def title @title end |
Instance Method Details
#to_hash ⇒ Object
37 38 39 40 41 42 43 44 45 46 47 48 |
# File 'motion/rss_parser.rb', line 37 def to_hash { :title => title, :description => description, :link => link, :pubDate => pubDate, :guid => guid, :enclosure => enclosure, :category => category, :encoded => encoded, } end |