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.



1161
1162
1163
1164
# File 'lib/resolv.rb', line 1161

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

Instance Attribute Details

#downcaseObject (readonly)

Returns the value of attribute downcase



1165
1166
1167
# File 'lib/resolv.rb', line 1165

def downcase
  @downcase
end

#stringObject (readonly)

Returns the value of attribute string



1165
1166
1167
# File 'lib/resolv.rb', line 1165

def string
  @string
end

Instance Method Details

#==(other) ⇒ Object



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

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

#eql?(other) ⇒ Boolean

Returns:

  • (Boolean)


1179
1180
1181
# File 'lib/resolv.rb', line 1179

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

#hashObject



1183
1184
1185
# File 'lib/resolv.rb', line 1183

def hash
  return @downcase.hash
end

#inspectObject



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

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

#to_sObject



1167
1168
1169
# File 'lib/resolv.rb', line 1167

def to_s
  return @string
end