Sha256: b30b72de1b3df1649e88c67c5af6c15a12a255f4b465423a0faf6f876d9a4e7b

Contents?: true

Size: 1.09 KB

Versions: 15

Compression:

Stored size: 1.09 KB

Contents

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


require 'whois/record/super_struct'


module Whois
  class Record

    # Holds the details of the Name Servers extracted from the WHOIS response.
    #
    # A name server is composed by the several attributes,
    # accessible through corresponding getter / setter methods.
    #
    # Please note that a response is not required to provide
    # all the attributes. When an attribute is not available,
    # the corresponding value is set to nil.
    #
    # @attr [String] name
    # @attr [String] ipv4
    # @attr [String] ipv6
    #
    class Nameserver < SuperStruct.new(:name, :ipv4, :ipv6)

      # Returns a string representation of this object
      # composed by the host +name+.
      #
      # @example
      #   Nameserver.new(:name => "ns.example.com").to_s
      #   # => "ns.example.com"
      #   Nameserver.new.to_s
      #   # => ""
      #
      # @return [String] The string representation.
      def to_s
        name.to_s
      end

    end

  end
end

Version data entries

15 entries across 15 versions & 1 rubygems

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