class Cregularity
- Cregularity
- Reference
- Object
Defined in:
cregularity.crConstant 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
-
#=~(other)
Pattern match.
- #append(*args)
- #at_least(times, pattern)
- #at_most(times, pattern)
- #between(range, pattern)
- #end_with(*args)
- #get
-
#inspect
Returns an unambiguous and information-rich string representation of this object, typically intended for developers.
- #maybe(*args)
- #not(*args)
- #one_of(ary)
- #one_or_more(pattern)
- #regex
- #start_with(*args)
- #then(*args)
-
#to_s
Returns a nicely readable and concise string representation of this object, typically intended for users.
- #zero_or_more(pattern)
Macro Summary
Constructor Detail
Instance Method Detail
Pattern match.
Overridden by descendants (notably Regex
and String
) to provide meaningful
pattern-match semantics.
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
.
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
.