Class: Tychus::ParserSelector
- Inherits:
-
Object
- Object
- Tychus::ParserSelector
- Defined in:
- lib/tychus/parser_selector.rb
Constant Summary collapse
- PARSERS =
[ Tychus::Parsers::AllrecipesParser, Tychus::Parsers::FoodNetworkParser, Tychus::Parsers::KraftRecipesParser ]
Class Method Summary collapse
Class Method Details
.resolve_parser(host) ⇒ Object
9 10 11 12 13 |
# File 'lib/tychus/parser_selector.rb', line 9 def self.resolve_parser(host) PARSERS.detect do |parser| host =~ %r[#{parser.uri_host}] end end |