Class: FeedNormalizer::Feed
- Inherits:
-
Object
- Object
- FeedNormalizer::Feed
- Includes:
- ElementCleaner, ElementEquality, Singular
- Defined in:
- lib/structures.rb
Overview
Represents the root element of a feed.
Constant Summary collapse
- HTML_ELEMENTS =
Elements that can contain HTML fragments.
[:title, :description]
- SIMPLE_ELEMENTS =
Elements that contain ‘plain’ Strings, with HTML escaped.
[:id, :last_updated, :copyright, :authors, :urls, :image, :generator]
- BLENDED_ELEMENTS =
Elements that contain both HTML and escaped HTML.
[:items]
- ELEMENTS =
HTML_ELEMENTS + SIMPLE_ELEMENTS + BLENDED_ELEMENTS
Instance Attribute Summary collapse
-
#parser ⇒ Object
Returns the value of attribute parser.
Instance Method Summary collapse
- #channel ⇒ Object
-
#initialize(wrapper) ⇒ Feed
constructor
A new instance of Feed.
Methods included from Singular
Methods included from ElementEquality
Methods included from ElementCleaner
Constructor Details
#initialize(wrapper) ⇒ Feed
Returns a new instance of Feed.
158 159 160 161 162 163 164 |
# File 'lib/structures.rb', line 158 def initialize(wrapper) # set up associations (i.e. arrays where needed) @urls = [] @authors = [] @items = [] @parser = wrapper.parser.to_s end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class FeedNormalizer::Singular
Instance Attribute Details
#parser ⇒ Object
Returns the value of attribute parser.
154 155 156 |
# File 'lib/structures.rb', line 154 def parser @parser end |
Instance Method Details
#channel ⇒ Object
166 |
# File 'lib/structures.rb', line 166 def channel() self end |