Sha256: f7246dceb1dce40bb4be1ca0dfa2967c13b92683f2e37a67aaa8b8c4316e2f42

Contents?: true

Size: 941 Bytes

Versions: 15

Compression:

Stored size: 941 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

      # Scanner for the whois.cctld.by server.
      #
      # @author Aliaksei Kliuchnikau <aliaksei.kliuchnikau@gmail.com>
      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

15 entries across 15 versions & 1 rubygems

Version Path
whois-3.6.2 lib/whois/record/scanners/whois.cctld.by.rb
whois-3.6.1 lib/whois/record/scanners/whois.cctld.by.rb
whois-3.6.0 lib/whois/record/scanners/whois.cctld.by.rb
whois-3.5.9 lib/whois/record/scanners/whois.cctld.by.rb
whois-3.5.8 lib/whois/record/scanners/whois.cctld.by.rb
whois-3.5.7 lib/whois/record/scanners/whois.cctld.by.rb
whois-3.5.6 lib/whois/record/scanners/whois.cctld.by.rb
whois-3.5.5 lib/whois/record/scanners/whois.cctld.by.rb
whois-3.5.4 lib/whois/record/scanners/whois.cctld.by.rb
whois-3.5.3 lib/whois/record/scanners/whois.cctld.by.rb
whois-3.5.2 lib/whois/record/scanners/whois.cctld.by.rb
whois-3.5.1 lib/whois/record/scanners/whois.cctld.by.rb
whois-3.5.0 lib/whois/record/scanners/whois.cctld.by.rb
whois-3.4.5 lib/whois/record/scanners/whois.cctld.by.rb
whois-3.4.4 lib/whois/record/scanners/whois.cctld.by.rb