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

Inherits:
Object
  • Object
show all
Defined in:
lib/resolv.rb

Overview

:nodoc:

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(string) ⇒ Str

Returns a new instance of Str.



967
968
969
970
# File 'lib/resolv.rb', line 967

def initialize(string)
  @string = string
  @downcase = string.downcase
end

Instance Attribute Details

#downcaseObject (readonly)

Returns the value of attribute downcase.



971
972
973
# File 'lib/resolv.rb', line 971

def downcase
  @downcase
end

#stringObject (readonly)

Returns the value of attribute string.



971
972
973
# File 'lib/resolv.rb', line 971

def string
  @string
end

Instance Method Details

#==(other) ⇒ Object



981
982
983
# File 'lib/resolv.rb', line 981

def ==(other)
  return @downcase == other.downcase
end

#eql?(other) ⇒ Boolean

Returns:

  • (Boolean)


985
986
987
# File 'lib/resolv.rb', line 985

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

#hashObject



989
990
991
# File 'lib/resolv.rb', line 989

def hash
  return @downcase.hash
end

#inspectObject



977
978
979
# File 'lib/resolv.rb', line 977

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

#to_sObject



973
974
975
# File 'lib/resolv.rb', line 973

def to_s
  return @string
end