Sha256: 7b1623a569f858b7389f69e194b2814fcc646426bb1165566f92d4377ad8d53a

Contents?: true

Size: 794 Bytes

Versions: 7

Compression:

Stored size: 794 Bytes

Contents

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


require 'whois/record/scanners/base'


module Whois
  class Record
    module Scanners

      # Scanner for the whois.nc record.
      class WhoisNc < Base

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


        MORES = ['Whois \.NC', 'more details on']

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

        tokenizer :skip_more do
          MORES.any? { |more| @input.skip(/^#{more}.*\n/) }
        end

      end

    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
whois-3.4.3 lib/whois/record/scanners/whois.nc.rb
whois-3.4.2 lib/whois/record/scanners/whois.nc.rb
whois-3.4.1 lib/whois/record/scanners/whois.nc.rb
whois-3.4.0 lib/whois/record/scanners/whois.nc.rb
whois-3.3.1 lib/whois/record/scanners/whois.nc.rb
whois-3.3.0 lib/whois/record/scanners/whois.nc.rb
whois-3.2.1 lib/whois/record/scanners/whois.nc.rb