123456789_123456789_123456789_123456789_123456789_

Class: Gem::Resolv::DNS::Label::Str

Do not use. This class is for internal use only.
Relationships & Source Files
Inherits: Object
Defined in: lib/rubygems/vendor/resolv/lib/resolv.rb

Class Method Summary

Instance Attribute Summary

Instance Method Summary

Constructor Details

.new(string) ⇒ Str

[ GitHub ]

  
# File 'lib/rubygems/vendor/resolv/lib/resolv.rb', line 1227

def initialize(string)
  @string = string
  # case insensivity of DNS labels doesn't apply non-ASCII characters. [RFC 4343]
  # This assumes @string is given in ASCII compatible encoding.
  @downcase = string.b.downcase
end

Instance Attribute Details

#downcase (readonly)

[ GitHub ]

  
# File 'lib/rubygems/vendor/resolv/lib/resolv.rb', line 1233

attr_reader :string, :downcase

#string (readonly)

[ GitHub ]

  
# File 'lib/rubygems/vendor/resolv/lib/resolv.rb', line 1233

attr_reader :string, :downcase

Instance Method Details

#==(other)

[ GitHub ]

  
# File 'lib/rubygems/vendor/resolv/lib/resolv.rb', line 1243

def ==(other)
  return self.class == other.class && @downcase == other.downcase
end

#eql?(other) ⇒ Boolean

[ GitHub ]

  
# File 'lib/rubygems/vendor/resolv/lib/resolv.rb', line 1247

def eql?(other)
  return self == other
end

#hash

[ GitHub ]

  
# File 'lib/rubygems/vendor/resolv/lib/resolv.rb', line 1251

def hash
  return @downcase.hash
end

#inspect

[ GitHub ]

  
# File 'lib/rubygems/vendor/resolv/lib/resolv.rb', line 1239

def inspect
  return "#<#{self.class} #{self}>"
end

#to_s

[ GitHub ]

  
# File 'lib/rubygems/vendor/resolv/lib/resolv.rb', line 1235

def to_s
  return @string
end