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.



1171
1172
1173
1174
# File 'lib/resolv.rb', line 1171

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

Instance Attribute Details

#downcaseObject (readonly)

Returns the value of attribute downcase



1175
1176
1177
# File 'lib/resolv.rb', line 1175

def downcase
  @downcase
end

#stringObject (readonly)

Returns the value of attribute string



1175
1176
1177
# File 'lib/resolv.rb', line 1175

def string
  @string
end

Instance Method Details

#==(other) ⇒ Object



1185
1186
1187
# File 'lib/resolv.rb', line 1185

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

#eql?(other) ⇒ Boolean

Returns:

  • (Boolean)


1189
1190
1191
# File 'lib/resolv.rb', line 1189

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

#hashObject



1193
1194
1195
# File 'lib/resolv.rb', line 1193

def hash
  return @downcase.hash
end

#inspectObject



1181
1182
1183
# File 'lib/resolv.rb', line 1181

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

#to_sObject



1177
1178
1179
# File 'lib/resolv.rb', line 1177

def to_s
  return @string
end