class PasswordBlacklist::Checker
Public Class Methods
new()
click to toggle source
# File lib/password_blacklist/checker.rb, line 3 def initialize file_path = File.expand_path('../../../data/Top95Thousand-probable.txt', __FILE__) @data = File.read(file_path) end
Public Instance Methods
blacklisted?(password)
click to toggle source
# File lib/password_blacklist/checker.rb, line 9 def blacklisted?(password) !!@data.match(Regexp.escape(password.downcase)) end
inspect()
click to toggle source
# File lib/password_blacklist/checker.rb, line 13 def inspect "#<#{self.class}:0x#{__id__.to_s(16)}>" end