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

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

Overview

:nodoc:

Instance Attribute Summary (collapse)

Instance Method Summary (collapse)

Constructor Details

- (Str) initialize(string)

A new instance of Str



1075
1076
1077
1078
# File 'lib/resolv.rb', line 1075

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

Instance Attribute Details

- (Object) downcase (readonly)

Returns the value of attribute downcase



1079
1080
1081
# File 'lib/resolv.rb', line 1079

def downcase
  @downcase
end

- (Object) string (readonly)

Returns the value of attribute string



1079
1080
1081
# File 'lib/resolv.rb', line 1079

def string
  @string
end

Instance Method Details

- (Object) ==(other)



1089
1090
1091
# File 'lib/resolv.rb', line 1089

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

- (Boolean) eql?(other)

Returns:

  • (Boolean)


1093
1094
1095
# File 'lib/resolv.rb', line 1093

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

- (Object) hash



1097
1098
1099
# File 'lib/resolv.rb', line 1097

def hash
  return @downcase.hash
end

- (Object) inspect



1085
1086
1087
# File 'lib/resolv.rb', line 1085

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

- (Object) to_s



1081
1082
1083
# File 'lib/resolv.rb', line 1081

def to_s
  return @string
end