Class: Zxcvbn::Tester
- Inherits:
-
Object
- Object
- Zxcvbn::Tester
- Defined in:
- lib/zxcvbn/tester.rb
Constant Summary collapse
- DATA_PATH =
Pathname(File.('../../../data/zxcvbn.js', __FILE__))
Instance Method Summary collapse
-
#initialize ⇒ Tester
constructor
A new instance of Tester.
- #test(password, user_inputs = []) ⇒ Object
Constructor Details
Instance Method Details
#test(password, user_inputs = []) ⇒ Object
12 13 14 15 |
# File 'lib/zxcvbn/tester.rb', line 12 def test(password, user_inputs = []) result = @context.eval("zxcvbn(#{password.to_json}, #{user_inputs.to_json})") OpenStruct.new(result) end |