Class: FeedNormalizer::Entry
- Inherits:
-
Object
- Object
- FeedNormalizer::Entry
- Includes:
- ElementCleaner, ElementEquality, RewriteRelativeLinks, Singular, TimeFix
- Defined in:
- lib/structures.rb
Overview
Represents a feed item entry. Available fields are:
* content
* description
* title
* date_published
* urls / url
* id
* authors / author
* copyright
* categories
Constant Summary collapse
- HTML_ELEMENTS =
[:content, :description, :title]
- SIMPLE_ELEMENTS =
[:date_published, :urls, :id, :authors, :copyright, :categories, :last_updated, :enclosures]
- BLENDED_ELEMENTS =
[]
- ELEMENTS =
HTML_ELEMENTS + SIMPLE_ELEMENTS + BLENDED_ELEMENTS
Instance Method Summary collapse
- #content ⇒ Object
- #date_published ⇒ Object
-
#initialize ⇒ Entry
constructor
A new instance of Entry.
Methods included from Singular
Methods included from ElementEquality
Methods included from ElementCleaner
Methods included from TimeFix
Methods included from RewriteRelativeLinks
Constructor Details
#initialize ⇒ Entry
Returns a new instance of Entry.
173 174 175 176 177 178 179 |
# File 'lib/structures.rb', line 173 def initialize @urls = [] @authors = [] @categories = [] @enclosures = [] @date_published, @content = nil end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class FeedNormalizer::Singular
Instance Method Details
#content ⇒ Object
187 188 189 |
# File 'lib/structures.rb', line 187 def content @content = rewrite_relative_links(@content, url) end |
#date_published ⇒ Object
182 183 184 |
# File 'lib/structures.rb', line 182 def date_published @date_published = reparse(@date_published) end |