Sha256: 10c7ccc8d2f5c435edbb2813a439d2280b93e35551a71428482ebc27361406cc

Contents?: true

Size: 827 Bytes

Versions: 7

Compression:

Stored size: 827 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.fi record.
      class WhoisFi < Base

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


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

        tokenizer :scan_disclaimer do
          if @input.match?(/^More information/)
            @ast["field:disclaimer"] = @input.scan_until(/(.*)\n\n/).strip
          end
        end

      end

    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
whois-3.5.4 lib/whois/record/scanners/whois.fi.rb
whois-3.5.3 lib/whois/record/scanners/whois.fi.rb
whois-3.5.2 lib/whois/record/scanners/whois.fi.rb
whois-3.5.1 lib/whois/record/scanners/whois.fi.rb
whois-3.5.0 lib/whois/record/scanners/whois.fi.rb
whois-3.4.5 lib/whois/record/scanners/whois.fi.rb
whois-3.4.4 lib/whois/record/scanners/whois.fi.rb