Sha256: b0ead84c67e455743d94830ecd0770ce84d9ddc0e65b5a327956b9943bca572e

Contents?: true

Size: 951 Bytes

Versions: 8

Compression:

Stored size: 951 Bytes

Contents

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

require 'whois/record/scanners/base'

module Whois
  class Record
    module Scanners

      # Scanner for the whois.cctld.by server.
      #
      # @author Aliaksei Kliuchnikau <aliaksei.kliuchnikau@gmail.com>
      # @since  2.5.0
      class WhoisCctldBy < Base

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

        tokenizer :scan_available do
          if @input.skip(/^Object does not exist/)
            @ast["status:available"] = true
          end
        end

        tokenizer :skip_dash_line do
          @input.skip(/^-+\n/)
        end

        tokenizer :skip_provider_signature do
          @input.scan(/^(.+)\n/)
        end

      end
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
whois-2.7.0 lib/whois/record/scanners/whois.cctld.by.rb
whois-2.6.4 lib/whois/record/scanners/whois.cctld.by.rb
whois-2.6.3 lib/whois/record/scanners/whois.cctld.by.rb
whois-2.6.2 lib/whois/record/scanners/whois.cctld.by.rb
whois-2.6.1 lib/whois/record/scanners/whois.cctld.by.rb
whois-2.6.0 lib/whois/record/scanners/whois.cctld.by.rb
whois-2.5.1 lib/whois/record/scanners/whois.cctld.by.rb
whois-2.5.0 lib/whois/record/scanners/whois.cctld.by.rb