struct PublicSuffix::Rule::Wildcard

Overview

Wildcard represents a wildcard rule (e.g. *.co.uk).

Defined in:

public_suffix/rule.cr

Constructors

Class Method Summary

Instance Method Summary

Instance methods inherited from struct PublicSuffix::Rule::Base

_private : Bool _private, decompose(domain : String) : Tuple(String | Nil, String | Nil) decompose, length : Int32 length, match?(name) match?, parts parts, value : String value

Constructor methods inherited from struct PublicSuffix::Rule::Base

new(value : String, length : Int32 | Nil = nil, _private : Bool = false) new

Class methods inherited from struct PublicSuffix::Rule::Base

build(content, _private = false) build

Constructor Detail

def self.new(value : String, length : Int32 | Nil = nil, _private = false) #

Initializes a new rule.

@param value [String] @param private [Boolean]


[View source]

Class Method Detail

def self.build(content, _private = false) #

Initializes a new rule from the content.

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


[View source]

Instance Method Detail

def 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] The array with [trd + sld, tld].


[View source]
def parts #

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

@return [Array]


[View source]
def rule #

Gets the original rule definition.

@return [String] The rule definition.


[View source]