Sha256: 4a4b6e52b2d14c00ce07acdcce87cb612ea66a1808a07f268b33baa1a00f844c

Contents?: true

Size: 741 Bytes

Versions: 8

Compression:

Stored size: 741 Bytes

Contents

require_relative 'base'

module Whois
  module Scanners

    # Scanner for the IIS.se company.
    class BaseIisse < Base

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


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

      tokenizer :scan_disclaimer do
        if @input.match?(/# Copyright/)
          lines = []
          while @input.scan(/#(.*)\n\n?/)
            lines << @input[1].strip unless @input[1].strip == ""
          end
          @ast["field:disclaimer"] = lines.join(" ")
        end
      end

    end

  end
end

Version data entries

8 entries across 8 versions & 2 rubygems

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