struct PublicSuffix::Rule::Normal

Overview

Normal represents a standard rule (e.g. com).

Defined in:

public_suffix/rule.cr

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

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]