class WebPageParser::GuardianPageParserFactory

Constants

INVALID_URL_RE
URL_RE

Public Class Methods

can_parse?(options) click to toggle source
# File lib/web-page-parser/parsers/guardian_page_parser.rb, line 5
def self.can_parse?(options)
  url = options[:url].split('#').first
  return nil if INVALID_URL_RE.match(url)
  URL_RE.match(url)
end
create(options = {}) click to toggle source
# File lib/web-page-parser/parsers/guardian_page_parser.rb, line 11
def self.create(options = {})
  GuardianPageParserV3.new(options)
end