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

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

Overview

:nodoc:

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(string) ⇒ Str

Returns a new instance of Str.



1013
1014
1015
1016
# File 'lib/rubysl/resolv/resolv.rb', line 1013

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

Instance Attribute Details

#downcaseObject (readonly)

Returns the value of attribute downcase.



1017
1018
1019
# File 'lib/rubysl/resolv/resolv.rb', line 1017

def downcase
  @downcase
end

#stringObject (readonly)

Returns the value of attribute string.



1017
1018
1019
# File 'lib/rubysl/resolv/resolv.rb', line 1017

def string
  @string
end

Instance Method Details

#==(other) ⇒ Object



1027
1028
1029
# File 'lib/rubysl/resolv/resolv.rb', line 1027

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

#eql?(other) ⇒ Boolean

Returns:

  • (Boolean)


1031
1032
1033
# File 'lib/rubysl/resolv/resolv.rb', line 1031

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

#hashObject



1035
1036
1037
# File 'lib/rubysl/resolv/resolv.rb', line 1035

def hash
  return @downcase.hash
end

#inspectObject



1023
1024
1025
# File 'lib/rubysl/resolv/resolv.rb', line 1023

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

#to_sObject



1019
1020
1021
# File 'lib/rubysl/resolv/resolv.rb', line 1019

def to_s
  return @string
end