Sha256: 23772af473e4e0126edaef5d01fbda32103a420bc796958e68c1364efeac56b5

Contents?: true

Size: 578 Bytes

Versions: 9

Compression:

Stored size: 578 Bytes

Contents

require_relative 'base'

module Whois
  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

Version data entries

9 entries across 9 versions & 2 rubygems

Version Path
whois-parser-2.0.0 lib/whois/scanners/whois.nc.rb
whois-parser-1.2.0 lib/whois/scanners/whois.nc.rb
whois-parser-1.1.0 lib/whois/scanners/whois.nc.rb
whois-parser-1.0.1 lib/whois/scanners/whois.nc.rb
hetzner-whois-parser-1.0.1.rc2 lib/whois/scanners/whois.nc.rb
hetzner-whois-parser-1.0.1.rc1 lib/whois/scanners/whois.nc.rb
whois-parser-1.0.0 lib/whois/scanners/whois.nc.rb
whois-parser-1.0.0.pre.beta2 lib/whois/scanners/whois.nc.rb
whois-parser-1.0.0.pre.beta1 lib/whois/scanners/whois.nc.rb