# File lib/Dnsruby/name.rb, line 380 def initialize(string) if (string.length > @@max_length) raise ResolvError.new("Label too long (#{string.length}, max length=#{MaxLabelLength}). Label = #{string}") end @downcase = string.downcase @string = string @string_length = string.length end
# File lib/Dnsruby/name.rb, line 376 def self.set_max_length(l) @@max_length=l end
Split a Name into its component Labels
# File lib/Dnsruby/name.rb, line 372 def self.split(arg) return Name.split(arg) end
# File lib/Dnsruby/name.rb, line 402 def <=>(other) return (@downcase <=> other.downcase) end
# File lib/Dnsruby/name.rb, line 407 def ==(other) return @downcase == other.downcase end
# File lib/Dnsruby/name.rb, line 411 def eql?(other) return self == other end
# File lib/Dnsruby/name.rb, line 415 def hash return @downcase.hash end
# File lib/Dnsruby/name.rb, line 398 def inspect return "#<#{self.class} #{self.to_s}>" end
# File lib/Dnsruby/name.rb, line 394 def length return @string_length end
# File lib/Dnsruby/name.rb, line 390 def to_s return @string.to_s # + "." end