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

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

Overview

:nodoc:

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(string) ⇒ Str

Returns a new instance of Str.



1098
1099
1100
1101
# File 'lib/fresolv.rb', line 1098

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

Instance Attribute Details

#downcaseObject (readonly)

Returns the value of attribute downcase.



1102
1103
1104
# File 'lib/fresolv.rb', line 1102

def downcase
  @downcase
end

#stringObject (readonly)

Returns the value of attribute string.



1102
1103
1104
# File 'lib/fresolv.rb', line 1102

def string
  @string
end

Instance Method Details

#==(other) ⇒ Object



1112
1113
1114
# File 'lib/fresolv.rb', line 1112

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

#eql?(other) ⇒ Boolean

Returns:

  • (Boolean)


1116
1117
1118
# File 'lib/fresolv.rb', line 1116

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

#hashObject



1120
1121
1122
# File 'lib/fresolv.rb', line 1120

def hash
  return @downcase.hash
end

#inspectObject



1108
1109
1110
# File 'lib/fresolv.rb', line 1108

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

#to_sObject



1104
1105
1106
# File 'lib/fresolv.rb', line 1104

def to_s
  return @string
end