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
- 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)
- - (Object) content
- - (Object) date_published
-
- (Entry) initialize
constructor
A new instance of Entry.
Methods included from RewriteRelativeLinks
Methods included from TimeFix
Methods included from ElementCleaner
Methods included from ElementEquality
Methods included from Singular
Constructor Details
- (Entry) initialize
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
- (Object) content
187 188 189 |
# File 'lib/structures.rb', line 187 def content @content = rewrite_relative_links(@content, url) end |
- (Object) date_published
182 183 184 |
# File 'lib/structures.rb', line 182 def date_published @date_published = reparse(@date_published) end |