Class: OohAuth::KeyGenerators::Passphrase
- Inherits:
-
String
- Object
- String
- OohAuth::KeyGenerators::Passphrase
- Defined in:
- lib/ooh-auth/key_generators.rb
Overview
A multi-word passphrase based on the dictionary, containing spaces.
Class Method Summary collapse
Class Method Details
.gen(len = 3) ⇒ Object
38 39 40 41 42 43 44 45 |
# File 'lib/ooh-auth/key_generators.rb', line 38 def self.gen(len=3) p = [] len.times do |i| pool = NOUNS.select {|w| !p.include?(w)} p << pool[rand(pool.length)] end return p.join(" ") end |