Class: Humpass::LockWord

Inherits:
Object
  • Object
show all
Defined in:
lib/humpass/lock_word.rb

Overview

LockWord

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeLockWord

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.expand_path(__FILE__)), 'words.txt'))
             .sample(15)
             .map { |w| w.strip }
end

Instance Attribute Details

#wordsObject (readonly)

Returns the value of attribute words.



12
13
14
# File 'lib/humpass/lock_word.rb', line 12

def words
  @words
end