Sha256: 1a284c77fad464095120735127beb61bab715e1da38b6a9e697cf37d763583af

Contents?: true

Size: 840 Bytes

Versions: 7

Compression:

Stored size: 840 Bytes

Contents

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


require 'whois/record/scanners/base'


module Whois
  class Record
    module Scanners

      class WhoisBiz < Base

        self.tokenizers += [
            :skip_empty_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.scan(/^\S(.+)\n/)
        end

      end

    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
whois-2.6.4 lib/whois/record/scanners/whois.biz.rb
whois-2.6.3 lib/whois/record/scanners/whois.biz.rb
whois-2.6.2 lib/whois/record/scanners/whois.biz.rb
whois-2.6.1 lib/whois/record/scanners/whois.biz.rb
whois-2.6.0 lib/whois/record/scanners/whois.biz.rb
whois-2.5.1 lib/whois/record/scanners/whois.biz.rb
whois-2.5.0 lib/whois/record/scanners/whois.biz.rb