Class: FeedzirraPodcast::Parser::RSS2
- Inherits:
-
Object
- Object
- FeedzirraPodcast::Parser::RSS2
- Includes:
- Feedzirra::FeedUtilities, SAXMachine
- Defined in:
- lib/feedzirra-podcast/parser/rss2.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#feed_url ⇒ Object
Returns the value of attribute feed_url.
Class Method Summary collapse
-
.able_to_parse?(xml) ⇒ Boolean
:nodoc:.
Instance Method Summary collapse
- #feedburner? ⇒ Boolean
- #image ⇒ Object
- #lastBuildDate ⇒ Object (also: #last_build_date)
- #managing_editor ⇒ Object (also: #managingeditor)
- #pubDate ⇒ Object (also: #pub_date, #pubdate)
- #web_master ⇒ Object (also: #webmaster)
Instance Attribute Details
#feed_url ⇒ Object
Returns the value of attribute feed_url.
41 42 43 |
# File 'lib/feedzirra-podcast/parser/rss2.rb', line 41 def feed_url @feed_url end |
Class Method Details
.able_to_parse?(xml) ⇒ Boolean
:nodoc:
43 44 45 |
# File 'lib/feedzirra-podcast/parser/rss2.rb', line 43 def self.able_to_parse?(xml) #:nodoc: (/\<rss|\<rdf/ =~ xml) end |
Instance Method Details
#feedburner? ⇒ Boolean
73 74 75 |
# File 'lib/feedzirra-podcast/parser/rss2.rb', line 73 def feedburner? !!feedburner_info_xmlns || !!feedburner_info_uri end |
#image ⇒ Object
47 48 49 50 51 52 53 54 55 56 |
# File 'lib/feedzirra-podcast/parser/rss2.rb', line 47 def image _url = image_object ? image_object.url : nil _title = image_object ? image_object.title : nil _link = image_object ? image_object.link : nil _width = image_object ? image_object.width : nil _height = image_object ? image_object.height : nil _description = image_object ? image_object.description : nil Struct.new(:url, :title, :link, :width, :height, :description).new(_url, _title, _link, _width, _height, _description) end |
#lastBuildDate ⇒ Object Also known as: last_build_date
66 67 68 69 70 |
# File 'lib/feedzirra-podcast/parser/rss2.rb', line 66 def lastBuildDate Time.parse(last_build_date_string).utc if last_build_date_string.present? rescue ArgumentError nil end |
#managing_editor ⇒ Object Also known as: managingeditor
77 78 79 |
# File 'lib/feedzirra-podcast/parser/rss2.rb', line 77 def managing_editor managingEditor end |
#pubDate ⇒ Object Also known as: pub_date, pubdate
58 59 60 61 62 |
# File 'lib/feedzirra-podcast/parser/rss2.rb', line 58 def pubDate Time.parse(pub_date_string).utc if pub_date_string.present? rescue ArgumentError nil end |
#web_master ⇒ Object Also known as: webmaster
82 83 84 |
# File 'lib/feedzirra-podcast/parser/rss2.rb', line 82 def web_master webMaster end |