Class: Resolv::DNS::Label::Str
- Inherits:
-
Object
- Object
- Resolv::DNS::Label::Str
- Defined in:
- lib/resolv.rb
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.
936 937 938 939 |
# File 'lib/resolv.rb', line 936 def initialize(string) @string = string @downcase = string.downcase end |
Instance Attribute Details
#downcase ⇒ Object (readonly)
Returns the value of attribute downcase.
940 941 942 |
# File 'lib/resolv.rb', line 940 def downcase @downcase end |
#string ⇒ Object (readonly)
Returns the value of attribute string.
940 941 942 |
# File 'lib/resolv.rb', line 940 def string @string end |
Instance Method Details
#==(other) ⇒ Object
950 951 952 |
# File 'lib/resolv.rb', line 950 def ==(other) return @downcase == other.downcase end |
#eql?(other) ⇒ Boolean
954 955 956 |
# File 'lib/resolv.rb', line 954 def eql?(other) return self == other end |
#hash ⇒ Object
958 959 960 |
# File 'lib/resolv.rb', line 958 def hash return @downcase.hash end |
#inspect ⇒ Object
946 947 948 |
# File 'lib/resolv.rb', line 946 def inspect return "#<#{self.class} #{self.to_s}>" end |
#to_s ⇒ Object
942 943 944 |
# File 'lib/resolv.rb', line 942 def to_s return @string end |