struct PublicSuffix::Rule::Wildcard
- PublicSuffix::Rule::Wildcard
- PublicSuffix::Rule::Base
- Struct
- Value
- Object
Overview
Wildcard represents a wildcard rule (e.g. *.co.uk).
Defined in:
public_suffix/rule.crConstructors
-
.new(value : String, length : Int32 | Nil = nil, _private = false)
Initializes a new rule.
Class Method Summary
-
.build(content, _private = false)
Initializes a new rule from the content.
Instance Method Summary
-
#decompose(domain : String) : Tuple(String | Nil, String | Nil)
Decomposes the domain name according to rule properties.
-
#parts
dot-split rule value and returns all rule parts in the order they appear in the value.
-
#rule
Gets the original rule definition.
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
Initializes a new rule.
@param value [String] @param private [Boolean]
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]
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
def parts
#
dot-split rule value and returns all rule parts in the order they appear in the value.
@return [Array