class RSSFeed::RSSImage
Public Class Methods
new(node)
click to toggle source
Initializes the image element.
# File lib/rss_feed/rss_image.rb, line 4 def initialize(node) @node = node end
Public Instance Methods
description()
click to toggle source
Description (optional)
# File lib/rss_feed/rss_image.rb, line 34 def description @node.at_xpath("description").try(:content) end
height()
click to toggle source
Height (optional)
# File lib/rss_feed/rss_image.rb, line 29 def height @node.at_xpath("height").try(:content).to_i end
link()
click to toggle source
Link (required)
# File lib/rss_feed/rss_image.rb, line 19 def link @node.at_xpath("link").content end
title()
click to toggle source
Title (required)
# File lib/rss_feed/rss_image.rb, line 14 def title @node.at_xpath("title").content end
url()
click to toggle source
URL (required)
# File lib/rss_feed/rss_image.rb, line 9 def url @node.at_xpath("url").content end
width()
click to toggle source
Width (optional)
# File lib/rss_feed/rss_image.rb, line 24 def width @node.at_xpath("width").try(:content).to_i end