Class: Zxcvbn::Omnimatch
- Inherits:
-
Object
- Object
- Zxcvbn::Omnimatch
- Defined in:
- lib/zxcvbn/omnimatch.rb
Instance Method Summary collapse
-
#initialize ⇒ Omnimatch
constructor
A new instance of Omnimatch.
- #matches(password, user_inputs = []) ⇒ Object
Constructor Details
#initialize ⇒ Omnimatch
Returns a new instance of Omnimatch.
7 8 9 |
# File 'lib/zxcvbn/omnimatch.rb', line 7 def initialize @matchers = build_matchers end |
Instance Method Details
#matches(password, user_inputs = []) ⇒ Object
11 12 13 14 15 16 17 |
# File 'lib/zxcvbn/omnimatch.rb', line 11 def matches(password, user_inputs = []) result = [] (@matchers + user_input_matchers(user_inputs)).each do |matcher| result += matcher.matches(password) end result end |