Class: FeedNormalizer::ParserRegistry
- Inherits:
-
Object
- Object
- FeedNormalizer::ParserRegistry
- Defined in:
- lib/feed-normalizer.rb
Overview
The parser registry keeps a list of current parsers that are available.
Constant Summary collapse
- @@parsers =
[]
Class Method Summary collapse
-
.parsers ⇒ Object
Returns a list of currently registered parsers, in order of priority.
- .register(parser) ⇒ Object
Class Method Details
.parsers ⇒ Object
Returns a list of currently registered parsers, in order of priority.
81 82 83 |
# File 'lib/feed-normalizer.rb', line 81 def self.parsers @@parsers.sort_by { |parser| parser.priority } end |
.register(parser) ⇒ Object
76 77 78 |
# File 'lib/feed-normalizer.rb', line 76 def self.register(parser) @@parsers << parser end |