Class: Superfeedr::Entry
Instance Method Summary collapse
- #authors ⇒ Object
- #categories ⇒ Object
-
#content ⇒ Object
entry : The content of the entry.
-
#id ⇒ Object
entry : the Unique ID of the entry.
-
#lang ⇒ Object
entry : The language of the entry.
- #link ⇒ Object
- #mime_type ⇒ Object
- #points ⇒ Object
-
#published_at ⇒ Object
entry : The publication date (iso8601) of the entry.
-
#summary ⇒ Object
entry (optional, unique) : The summary of the entry.
-
#title ⇒ Object
entry : The title of the entry.
-
#updated_at ⇒ Object
entry : The last updated date (iso8601) of the entry.
Methods inherited from Node
Constructor Details
This class inherits a constructor from Superfeedr::Node
Instance Method Details
#authors ⇒ Object
83 84 85 |
# File 'lib/superfeedr/superfeedr.rb', line 83 def xpath(".//atom:author").map { |child| Author.new(child) } end |
#categories ⇒ Object
79 80 81 |
# File 'lib/superfeedr/superfeedr.rb', line 79 def categories xpath(".//atom:category/@term").map { |c| c.text } end |
#content ⇒ Object
entry : The content of the entry. Check the type attribute to determine the mime-type.
56 57 58 |
# File 'lib/superfeedr/superfeedr.rb', line 56 def content content_from("atom:content") end |
#id ⇒ Object
entry : the Unique ID of the entry. If the original entry doesn’t have an ID.
36 37 38 |
# File 'lib/superfeedr/superfeedr.rb', line 36 def id content_from("atom:id") end |
#lang ⇒ Object
entry : The language of the entry. It’s either extracted or computed from the content (the longer t# he content, the more relevant).
70 71 72 |
# File 'lib/superfeedr/superfeedr.rb', line 70 def lang content_from("@lang") end |
#link ⇒ Object
74 75 76 77 |
# File 'lib/superfeedr/superfeedr.rb', line 74 def link child = xpath("atom:link") Link.new(child) if child end |
#mime_type ⇒ Object
60 61 62 |
# File 'lib/superfeedr/superfeedr.rb', line 60 def mime_type content_from("atom:content/@type") end |
#points ⇒ Object
87 88 89 |
# File 'lib/superfeedr/superfeedr.rb', line 87 def points xpath(".//geo:point").map { |child| Point.new(child) } end |
#published_at ⇒ Object
entry : The publication date (iso8601) of the entry.
46 47 48 |
# File 'lib/superfeedr/superfeedr.rb', line 46 def published_at datetime_from("atom:published") end |
#summary ⇒ Object
entry (optional, unique) : The summary of the entry. Check the type attribute to determine the mime-type
65 66 67 |
# File 'lib/superfeedr/superfeedr.rb', line 65 def summary content_from("atom:summary") end |
#title ⇒ Object
entry : The title of the entry.
41 42 43 |
# File 'lib/superfeedr/superfeedr.rb', line 41 def title content_from("atom:title") end |
#updated_at ⇒ Object
entry : The last updated date (iso8601) of the entry.
51 52 53 |
# File 'lib/superfeedr/superfeedr.rb', line 51 def updated_at datetime_from("atom:updated") end |