Class: Zxcvbn::Matchers::Digits Private
- Inherits:
-
Object
- Object
- Zxcvbn::Matchers::Digits
- Includes:
- RegexHelpers
- Defined in:
- lib/zxcvbn/matchers/digits.rb
Overview
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
Matches runs of 3 or more consecutive digits in the password.
Constant Summary collapse
- DIGITS_REGEX =
This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.
Matches runs of 3 or more consecutive digits.
/\d{3,}/
Instance Method Summary collapse
-
#matches(password) ⇒ Array<MatchBuilder>
private
Matches with pattern “digits”.
Methods included from RegexHelpers
Instance Method Details
#matches(password) ⇒ Array<MatchBuilder>
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.
Returns matches with pattern “digits”.
17 18 19 20 21 22 23 24 |
# File 'lib/zxcvbn/matchers/digits.rb', line 17 def matches(password) result = [] re_match_all(DIGITS_REGEX, password) do |match| match.pattern = 'digits' result << match end result end |