Class: WebPageParser::WashingtonPostPageParserFactory
- Inherits:
-
ParserFactory
- Object
- ParserFactory
- WebPageParser::WashingtonPostPageParserFactory
show all
- Defined in:
- lib/web-page-parser/parsers/washingtonpost_page_parser.rb
Constant Summary
collapse
- URL_RE =
ORegexp.new('www\.washingtonpost\.com/.*_story\.html')
Class Method Summary
collapse
add_factory, #can_parse?, #create, factories, inherited, load, parser_for
Class Method Details
.can_parse?(options) ⇒ Boolean
4
5
6
7
|
# File 'lib/web-page-parser/parsers/washingtonpost_page_parser.rb', line 4
def self.can_parse?(options)
url = options[:url].split('#').first
URL_RE.match(url)
end
|
.create(options = {}) ⇒ Object
9
10
11
|
# File 'lib/web-page-parser/parsers/washingtonpost_page_parser.rb', line 9
def self.create(options = {})
WashingtonPostPageParserV1.new(options)
end
|