PublicSuffix::Rule::Wildcard
Inherits PublicSuffix::Rule::Base < Struct < Value < Object
Wildcard represents a wildcard rule (e.g. *.co.uk).
Constructors
new(value : String, length : Int32 | Nil = nil, _private = false)
Initializes a new rule.
@param value [String] @param private [Boolean]
Class methods
build(content, _private = false)
Initializes a new rule from the content.
@param content [String] the content of the rule @param private [Boolean]
Instance methods
decompose(domain : String) : Tuple(String | Nil, String | Nil)
Decomposes the domain name according to rule properties.
@param [String, #to_s] name The domain name to decompose @return [Array<String>] The array with [trd + sld, tld].
parts
dot-split rule value and returns all rule parts in the order they appear in the value.
@return [Array<String>]