Class: Pil::PasswordList
- Inherits:
-
Object
- Object
- Pil::PasswordList
- Extended by:
- Forwardable
- Defined in:
- lib/pil/password_list.rb
Constant Summary collapse
- DEFAULT_PASSWORD_FILE =
File.('../../data/passwords.txt', __FILE__)
Instance Attribute Summary collapse
-
#passwords ⇒ Object
readonly
Returns the value of attribute passwords.
Instance Method Summary collapse
- #exclude?(password) ⇒ Boolean
-
#initialize(datafile = DEFAULT_PASSWORD_FILE) ⇒ PasswordList
constructor
A new instance of PasswordList.
Constructor Details
#initialize(datafile = DEFAULT_PASSWORD_FILE) ⇒ PasswordList
Returns a new instance of PasswordList.
15 16 17 |
# File 'lib/pil/password_list.rb', line 15 def initialize(datafile = DEFAULT_PASSWORD_FILE) load_passwords(datafile) end |
Instance Attribute Details
#passwords ⇒ Object (readonly)
Returns the value of attribute passwords.
6 7 8 |
# File 'lib/pil/password_list.rb', line 6 def passwords @passwords end |
Instance Method Details
#exclude?(password) ⇒ Boolean
19 20 21 |
# File 'lib/pil/password_list.rb', line 19 def exclude?(password) !include?(password) end |