class Dnsruby::Name::Label
Dnsruby::Label class¶ ↑
(RFC1035, section 3.1)
Constants
- MaxLabelLength
Attributes
Public Class Methods
Source
# File lib/dnsruby/name.rb, line 396 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
Source
# File lib/dnsruby/name.rb, line 392 def self.set_max_length(l) @@max_length=l end
Source
# File lib/dnsruby/name.rb, line 388 def self.split(arg) return Name.split(arg) end
Split a Name
into its component Labels
Public Instance Methods
Source
# File lib/dnsruby/name.rb, line 418 def <=>(other) return (@downcase <=> other.downcase) end
Source
# File lib/dnsruby/name.rb, line 423 def ==(other) return @downcase == other.downcase end
Source
# File lib/dnsruby/name.rb, line 414 def inspect return "#<#{self.class} #{self.to_s}>" end