Sha256: 497e79d9c752b0ff35d9ec11089a0d1479221180f6139d19fb15715cd7d04711

Contents?: true

Size: 790 Bytes

Versions: 5

Compression:

Stored size: 790 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 BaseShared1 < Base

        self.tokenizers += [
            :skip_empty_line,
            :scan_available,
            :scan_reserved,
            :scan_keyvalue,
        ]


        tokenizer :scan_available do
          if @input.skip(/^No Data Found\n/)
            @ast["status:available"] = true
          end
        end

        tokenizer :scan_reserved do
          if settings[:pattern_reserved] && @input.scan(settings[:pattern_reserved])
            @ast["status:reserved"] = true
          end
        end

      end

    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
whois-3.6.2 lib/whois/record/scanners/base_shared1.rb
whois-3.6.1 lib/whois/record/scanners/base_shared1.rb
whois-3.6.0 lib/whois/record/scanners/base_shared1.rb
whois-3.5.9 lib/whois/record/scanners/base_shared1.rb
whois-3.5.8 lib/whois/record/scanners/base_shared1.rb