Class: TestPageParserFactory

Inherits:
WebPageParser::ParserFactory show all
Defined in:
lib/web-page-parser/parsers/test_page_parser.rb

Class Method Summary collapse

Methods inherited from WebPageParser::ParserFactory

add_factory, #can_parse?, #create, factories, inherited, load, parser_for

Class Method Details

.can_parse?(options = {}) ⇒ Boolean

Returns:

  • (Boolean)


4
5
6
# File 'lib/web-page-parser/parsers/test_page_parser.rb', line 4

def self.can_parse?(options = {})
  @url_regexp.match(options[:url])
end

.create(options = {}) ⇒ Object



8
9
10
# File 'lib/web-page-parser/parsers/test_page_parser.rb', line 8

def self.create(options = {})
  TestPageParser.new(options)
end