Class: FeedNormalizer::ParserRegistry

Inherits:
Object
  • Object
show all
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

Class Method Details

.parsersObject

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