Class: Humpass::LockWord
- Inherits:
-
Object
- Object
- Humpass::LockWord
- Defined in:
- lib/humpass/lock_word.rb
Overview
LockWord
Instance Attribute Summary collapse
-
#words ⇒ Object
readonly
Returns the value of attribute words.
Instance Method Summary collapse
-
#initialize ⇒ LockWord
constructor
A new instance of LockWord.
Constructor Details
#initialize ⇒ LockWord
Returns a new instance of LockWord.
13 14 15 16 17 |
# File 'lib/humpass/lock_word.rb', line 13 def initialize @words = File.readlines(File.join(File.dirname(File.(__FILE__)), 'words.txt')) .sample(15) .map { |w| w.strip } end |
Instance Attribute Details
#words ⇒ Object (readonly)
Returns the value of attribute words.
12 13 14 |
# File 'lib/humpass/lock_word.rb', line 12 def words @words end |