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
80 81 82 |
# File 'lib/superfeedr/superfeedr.rb', line 80 def xpath(".//atom:author").map { |child| Author.new(child) } end |
#categories ⇒ Object
76 77 78 |
# File 'lib/superfeedr/superfeedr.rb', line 76 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.
53 54 55 |
# File 'lib/superfeedr/superfeedr.rb', line 53 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.
33 34 35 |
# File 'lib/superfeedr/superfeedr.rb', line 33 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).
67 68 69 |
# File 'lib/superfeedr/superfeedr.rb', line 67 def lang content_from("@lang") end |
#link ⇒ Object
71 72 73 74 |
# File 'lib/superfeedr/superfeedr.rb', line 71 def link child = xpath("atom:link") Link.new(child) if child end |
#mime_type ⇒ Object
57 58 59 |
# File 'lib/superfeedr/superfeedr.rb', line 57 def mime_type content_from("atom:content/@type") end |
#points ⇒ Object
84 85 86 |
# File 'lib/superfeedr/superfeedr.rb', line 84 def points xpath(".//geo:point").map { |child| Point.new(child) } end |
#published_at ⇒ Object
entry : The publication date (iso8601) of the entry.
43 44 45 |
# File 'lib/superfeedr/superfeedr.rb', line 43 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
62 63 64 |
# File 'lib/superfeedr/superfeedr.rb', line 62 def summary content_from("atom:summary") end |
#title ⇒ Object
entry : The title of the entry.
38 39 40 |
# File 'lib/superfeedr/superfeedr.rb', line 38 def title content_from("atom:title") end |
#updated_at ⇒ Object
entry : The last updated date (iso8601) of the entry.
48 49 50 |
# File 'lib/superfeedr/superfeedr.rb', line 48 def updated_at datetime_from("atom:updated") end |