Sha256: d386e7f887f30a5199e65480c474d22c96f414cb6f162e67b07a6a4935eb21bd

Contents?: true

Size: 843 Bytes

Versions: 3

Compression:

Stored size: 843 Bytes

Contents

#--
# Ruby Whois
#
# An intelligent pure Ruby WHOIS client and parser.
#
# Copyright (c) 2009-2015 Simone Carletti <weppos@weppos.net>
#++


require 'whois/record/scanners/base'


module Whois
  class Record
    module Scanners

      class BaseShared2 < Base

        self.tokenizers += [
            :skip_blank_line,
            :scan_available,
            :scan_keyvalue,
            :skip_lastupdate,
            :skip_fuffa,
        ]


        tokenizer :scan_available do
          if @input.scan(/^Not found: (.+)\n/)
            @ast["Domain Name"] = @input[1]
            @ast["status:available"] = true
          end
        end

        tokenizer :skip_lastupdate do
          @input.skip(/>>>(.+?)<<<\n/)
        end

        tokenizer :skip_fuffa do
          @input.skip(/^\S(.+)\n/)
        end

      end

    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
whois-3.6.5 lib/whois/record/scanners/base_shared2.rb
whois-3.6.4 lib/whois/record/scanners/base_shared2.rb
whois-3.6.3 lib/whois/record/scanners/base_shared2.rb