Class: Vanguard::Matcher::Nullary::Format::Regexp
- Inherits:
-
Vanguard::Matcher::Nullary::Format
- Object
- Vanguard::Matcher
- Vanguard::Matcher::Nullary
- Vanguard::Matcher::Nullary::Format
- Vanguard::Matcher::Nullary::Format::Regexp
- Defined in:
- lib/vanguard/matcher/nullary/format.rb
Overview
Matcher for regexps
Constant Summary
Constants inherited from Vanguard::Matcher::Nullary::Format
EMAIL_ADDRESS, EMAIL_ADDRESS_REGEXP, URL, URL_REGEXP
Instance Attribute Summary collapse
-
#regexp ⇒ Regexp
readonly
private
Return regexp.
Instance Method Summary collapse
-
#matches?(input) ⇒ true, false
private
Test if input matches regexp.
Methods inherited from Vanguard::Matcher::Nullary::Format
Instance Attribute Details
#regexp ⇒ Regexp (readonly)
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Return regexp
18 19 20 |
# File 'lib/vanguard/matcher/nullary/format.rb', line 18 def regexp @regexp end |
Instance Method Details
#matches?(input) ⇒ true, false
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Test if input matches regexp
32 33 34 |
# File 'lib/vanguard/matcher/nullary/format.rb', line 32 def matches?(input) !!(regexp =~ input) end |