Class: Resolv::DNS::Label::Str
- Inherits:
-
Object
- Object
- Resolv::DNS::Label::Str
- Defined in:
- lib/fresolv.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.
1098 1099 1100 1101 |
# File 'lib/fresolv.rb', line 1098 def initialize(string) @string = string @downcase = string.downcase end |
Instance Attribute Details
#downcase ⇒ Object (readonly)
Returns the value of attribute downcase.
1102 1103 1104 |
# File 'lib/fresolv.rb', line 1102 def downcase @downcase end |
#string ⇒ Object (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
1116 1117 1118 |
# File 'lib/fresolv.rb', line 1116 def eql?(other) return self == other end |
#hash ⇒ Object
1120 1121 1122 |
# File 'lib/fresolv.rb', line 1120 def hash return @downcase.hash end |
#inspect ⇒ Object
1108 1109 1110 |
# File 'lib/fresolv.rb', line 1108 def inspect return "#<#{self.class} #{self.to_s}>" end |
#to_s ⇒ Object
1104 1105 1106 |
# File 'lib/fresolv.rb', line 1104 def to_s return @string end |