Sha256: 9d079931360623b863d9a1b74921787b6b2a709fed66050ae706b02fef3a6b50

Contents?: true

Size: 843 Bytes

Versions: 15

Compression:

Stored size: 843 Bytes

Contents

#--
# Ruby Whois
#
# An intelligent pure Ruby WHOIS client and parser.
#
# Copyright (c) 2009-2014 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

15 entries across 15 versions & 1 rubygems

Version Path
whois-3.6.2 lib/whois/record/scanners/base_shared2.rb
whois-3.6.1 lib/whois/record/scanners/base_shared2.rb
whois-3.6.0 lib/whois/record/scanners/base_shared2.rb
whois-3.5.9 lib/whois/record/scanners/base_shared2.rb
whois-3.5.8 lib/whois/record/scanners/base_shared2.rb
whois-3.5.7 lib/whois/record/scanners/base_shared2.rb
whois-3.5.6 lib/whois/record/scanners/base_shared2.rb
whois-3.5.5 lib/whois/record/scanners/base_shared2.rb
whois-3.5.4 lib/whois/record/scanners/base_shared2.rb
whois-3.5.3 lib/whois/record/scanners/base_shared2.rb
whois-3.5.2 lib/whois/record/scanners/base_shared2.rb
whois-3.5.1 lib/whois/record/scanners/base_shared2.rb
whois-3.5.0 lib/whois/record/scanners/base_shared2.rb
whois-3.4.5 lib/whois/record/scanners/base_shared2.rb
whois-3.4.4 lib/whois/record/scanners/base_shared2.rb