class Cregularity

Defined in:

cregularity.cr

Constant Summary

ESCAPED_CHARS = ["*", ".", "?", "^", "+", "$", "|", "(", ")", "[", "]", "{", "}"]
PATTERNS = {"digit" => "[0-9]", "lowercase" => "[a-z]", "uppercase" => "[A-Z]", "letter" => "[A-Za-z]", "alphanumeric" => "[A-Za-z0-9]", "whitespace" => "\\s", "space" => " ", "tab" => "\\t"}

Constructors

Instance Method Summary

Macro Summary

Constructor Detail

def self.new #

[View source]

Instance Method Detail

def =~(other) #
Description copied from class Object

Pattern match.

Overridden by descendants (notably Regex and String) to provide meaningful pattern-match semantics.


[View source]
def append(*args) #

[View source]
def at_least(times, pattern) #

[View source]
def at_most(times, pattern) #

[View source]
def between(range, pattern) #

[View source]
def end_with(*args) #

[View source]
def get #

[View source]
def inspect #
Description copied from class Object

Returns an unambiguous and information-rich string representation of this object, typically intended for developers.

This method should usually not be overridden. It delegates to #inspect(IO) which can be overridden for custom implementations.

Also see #to_s.


[View source]
def maybe(*args) #

[View source]
def not(*args) #

[View source]
def one_of(ary) #

[View source]
def one_or_more(pattern) #

[View source]
def regex #

[View source]
def start_with(*args) #

[View source]
def then(*args) #

[View source]
def to_s #
Description copied from class Object

Returns a nicely readable and concise string representation of this object, typically intended for users.

This method should usually not be overridden. It delegates to #to_s(IO) which can be overridden for custom implementations.

Also see #inspect.


[View source]
def zero_or_more(pattern) #

[View source]

Macro Detail

macro method_missing(call) #

[View source]