struct

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]

Source

Class methods

build(content, _private = false)

Initializes a new rule from the content.

@param content [String] the content of the rule @param private [Boolean]

Source

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].

Source
parts

dot-split rule value and returns all rule parts in the order they appear in the value.

@return [Array<String>]

Source
rule

Gets the original rule definition.

@return [String] The rule definition.

Source