# Resolv::DNS::Name (Class)

In: | resolv.rb
Parent: | Object

## Methods

== [] absolute? create eql? hash length new to_a to_s

## Public Class methods

create(arg)

[Source]

    # File resolv.rb, line 898
          def self.create(arg)
            case arg
            when Name
              return arg
            when String
              return Name.new(Label.split(arg), /\.\z/ =~ arg ? true : false)
            else
              raise ArgumentError.new("cannot interpret as DNS name: #{arg.inspect}")
            end
          end

new(labels, absolute=true)

[Source]

    # File resolv.rb, line 909
          def initialize(labels, absolute=true)
            @labels = labels
            @absolute = absolute
          end

## Public Instance methods

absolute?()

[Source]

    # File resolv.rb, line 914
          def absolute?
            return @absolute
          end

==(other)

[Source]

    # File resolv.rb, line 918
          def ==(other)
            return @labels == other.to_a && @absolute == other.absolute?
          end

eql?(other)

Alias for #==

hash()

[Source]

    # File resolv.rb, line 923
          def hash
            return @labels.hash ^ @absolute.hash
          end

to_a()

[Source]

    # File resolv.rb, line 927
          def to_a
            return @labels
          end

length()

[Source]

    # File resolv.rb, line 931
          def length
            return @labels.length
          end

[](i)

[Source]

    # File resolv.rb, line 935
          def [](i)
            return @labels[i]
          end

to_s()

[Source]

    # File resolv.rb, line 939
          def to_s
            return @labels.join('.')
          end

[Validate]