Class: Pil::PasswordList

Inherits:
Object
  • Object
show all
Extended by:
Forwardable
Defined in:
lib/pil/password_list.rb

Constant Summary collapse

DEFAULT_PASSWORD_FILE =
File.expand_path('../../data/passwords.txt', __FILE__)

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#passwordsObject (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

Returns:

  • (Boolean)


19
20
21
# File 'lib/pil/password_list.rb', line 19

def exclude?(password)
  !include?(password)
end