Module: ConvenientGrouper::Regex
- Defined in:
- lib/convenient_grouper/regex.rb
Defined Under Namespace
Modules: Expression
Constant Summary collapse
- ALL_EXPRESSIONS =
Expression.constants.map { |symbol| Expression.const_get(symbol) }
Class Method Summary collapse
Class Method Details
.matches?(value) ⇒ Boolean
13 14 15 16 17 18 |
# File 'lib/convenient_grouper/regex.rb', line 13 def matches?(value) value.is_a?(String) && ALL_EXPRESSIONS.any? do |expression| expression.match(value.strip) end end |