Class: BubbleWrap::RSSParser::RSSItem

Inherits:
Object
  • Object
show all
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

Instance Method Summary collapse

Constructor Details

#initializeRSSItem

Returns a new instance of RSSItem



33
34
35
# File 'motion/rss_parser.rb', line 33

def initialize
  @title, @description, @link, @pubDate, @guid = '', '', '', '', ''
end

Instance Attribute Details

#descriptionObject

Returns the value of attribute description



31
32
33
# File 'motion/rss_parser.rb', line 31

def description
  @description
end

#enclosureObject

Returns the value of attribute enclosure



31
32
33
# File 'motion/rss_parser.rb', line 31

def enclosure
  @enclosure
end

#guidObject

Returns the value of attribute guid



31
32
33
# File 'motion/rss_parser.rb', line 31

def guid
  @guid
end

Returns the value of attribute link



31
32
33
# File 'motion/rss_parser.rb', line 31

def link
  @link
end

#pubDateObject

Returns the value of attribute pubDate



31
32
33
# File 'motion/rss_parser.rb', line 31

def pubDate
  @pubDate
end

#titleObject

Returns the value of attribute title



31
32
33
# File 'motion/rss_parser.rb', line 31

def title
  @title
end

Instance Method Details

#to_hashObject



37
38
39
40
41
42
43
44
45
46
# File 'motion/rss_parser.rb', line 37

def to_hash
  {
    :title        => title,
    :description  => description,
    :link         => link,
    :pubDate      => pubDate,
    :guid         => guid,
    :enclosure    => enclosure
  }
end