Sha256: 4d85aa75e30051bea8a07cfd7001e15560fe6215f65de641b4ee14a5a920520a

Contents?: true

Size: 461 Bytes

Versions: 3

Compression:

Stored size: 461 Bytes

Contents

module Janis

  module Parsing

    module SpecificParsers
      class SimpleParser < ProxyWebsiteParser
        PROXY_REGEX = /\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}\:\d{1,5}/
        def initialize
          super
          @html_doc = obtain_html_doc
        end        
        def parse
          @result ||= @html_doc.to_s.scan(PROXY_REGEX)
        end
        def self.url
          'file://./test/html/simple.html'
        end
      end
    end

  end

end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
janis-0.1.2 lib/janis/specific_parsers/simple.rb
janis-0.1.1 lib/janis/specific_parsers/simple.rb
janis-0.1.0 lib/janis/specific_parsers/simple.rb