Decomposes the domain according to rule properties.
@param [String, to_s] domain
The domain name to decompose.
@return [Array<String>]
The array with [trd + sld, tld].
# File lib/public_suffix/rule.rb, line 364 def decompose(domain) domain.to_s.chomp(".") =~ /^(.*)\.(#{parts.join('\.')})$/ [$1, $2] end
dot-split rule value and returns all rule parts in the order they appear in the value. The leftmost label is not considered a label.
See publicsuffix.org/format/: If the prevailing rule is a exception rule, modify it by removing the leftmost label.
@return [Array<String>]
# File lib/public_suffix/rule.rb, line 352 def parts @parts ||= @value.split(".")[1..-1] end
Generated with the Darkfish Rdoc Generator 2.