Class: Resolv::DNS::Label::Str
- Inherits:
-
Object
- Object
- Resolv::DNS::Label::Str
- Defined in:
- lib/resolv.rb
Overview
:nodoc:
Instance Attribute Summary collapse
-
#downcase ⇒ Object
readonly
Returns the value of attribute downcase.
-
#string ⇒ Object
readonly
Returns the value of attribute string.
Instance Method Summary collapse
- #==(other) ⇒ Object
- #eql?(other) ⇒ Boolean
- #hash ⇒ Object
-
#initialize(string) ⇒ Str
constructor
A new instance of Str.
- #inspect ⇒ Object
- #to_s ⇒ Object
Constructor Details
#initialize(string) ⇒ Str
Returns a new instance of Str.
1130 1131 1132 1133 |
# File 'lib/resolv.rb', line 1130 def initialize(string) @string = string @downcase = string.downcase end |
Instance Attribute Details
#downcase ⇒ Object (readonly)
Returns the value of attribute downcase
1134 1135 1136 |
# File 'lib/resolv.rb', line 1134 def downcase @downcase end |
#string ⇒ Object (readonly)
Returns the value of attribute string
1134 1135 1136 |
# File 'lib/resolv.rb', line 1134 def string @string end |
Instance Method Details
#==(other) ⇒ Object
1144 1145 1146 |
# File 'lib/resolv.rb', line 1144 def ==(other) return @downcase == other.downcase end |
#eql?(other) ⇒ Boolean
1148 1149 1150 |
# File 'lib/resolv.rb', line 1148 def eql?(other) return self == other end |
#hash ⇒ Object
1152 1153 1154 |
# File 'lib/resolv.rb', line 1152 def hash return @downcase.hash end |
#inspect ⇒ Object
1140 1141 1142 |
# File 'lib/resolv.rb', line 1140 def inspect return "#<#{self.class} #{self.to_s}>" end |
#to_s ⇒ Object
1136 1137 1138 |
# File 'lib/resolv.rb', line 1136 def to_s return @string end |