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

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(string) ⇒ Str

Returns a new instance of Str.



940
941
942
943
# File 'lib/logmerge/resolv.rb', line 940

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

Instance Attribute Details

#downcaseObject (readonly)

Returns the value of attribute downcase.



944
945
946
# File 'lib/logmerge/resolv.rb', line 944

def downcase
  @downcase
end

#stringObject (readonly)

Returns the value of attribute string.



944
945
946
# File 'lib/logmerge/resolv.rb', line 944

def string
  @string
end

Instance Method Details

#==(other) ⇒ Object



954
955
956
# File 'lib/logmerge/resolv.rb', line 954

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

#eql?(other) ⇒ Boolean

Returns:

  • (Boolean)


958
959
960
# File 'lib/logmerge/resolv.rb', line 958

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

#hashObject



962
963
964
# File 'lib/logmerge/resolv.rb', line 962

def hash
  return @downcase.hash
end

#inspectObject



950
951
952
# File 'lib/logmerge/resolv.rb', line 950

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

#to_sObject



946
947
948
# File 'lib/logmerge/resolv.rb', line 946

def to_s
  return @string
end