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

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(string) ⇒ Str

Returns a new instance of Str.



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

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

Instance Attribute Details

#downcaseObject (readonly)

Returns the value of attribute downcase



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

def downcase
  @downcase
end

#stringObject (readonly)

Returns the value of attribute string



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

def string
  @string
end

Instance Method Details

#==(other) ⇒ Object



996
997
998
# File 'lib/resolv.rb', line 996

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

#eql?(other) ⇒ Boolean

Returns:

  • (Boolean)


1000
1001
1002
# File 'lib/resolv.rb', line 1000

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

#hashObject



1004
1005
1006
# File 'lib/resolv.rb', line 1004

def hash
  return @downcase.hash
end

#inspectObject



992
993
994
# File 'lib/resolv.rb', line 992

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

#to_sObject



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

def to_s
  return @string
end