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.



1046
1047
1048
1049
# File 'lib/resolv.rb', line 1046

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

Instance Attribute Details

#downcaseObject (readonly)

Returns the value of attribute downcase



1050
1051
1052
# File 'lib/resolv.rb', line 1050

def downcase
  @downcase
end

#stringObject (readonly)

Returns the value of attribute string



1050
1051
1052
# File 'lib/resolv.rb', line 1050

def string
  @string
end

Instance Method Details

#==(other) ⇒ Object



1060
1061
1062
# File 'lib/resolv.rb', line 1060

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

#eql?(other) ⇒ Boolean

Returns:

  • (Boolean)


1064
1065
1066
# File 'lib/resolv.rb', line 1064

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

#hashObject



1068
1069
1070
# File 'lib/resolv.rb', line 1068

def hash
  return @downcase.hash
end

#inspectObject



1056
1057
1058
# File 'lib/resolv.rb', line 1056

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

#to_sObject



1052
1053
1054
# File 'lib/resolv.rb', line 1052

def to_s
  return @string
end