Sha256: 9f517917d7c7959bf8352ab9109e553a428297199a1c72908ce04d36fc54ea75
Contents?: true
Size: 343 Bytes
Versions: 1
Compression:
Stored size: 343 Bytes
Contents
class Generator def self.random(length=(3..7).to_a.sample) generate('?' * length) end def self.human(length=(3..7).to_a.sample) generate(('*#' * length).slice(rand(length), length)) end def self.format(format) generate(format) end def self.generate(format) format.split('').map(&:namna_sub).join('') end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
namna-0.0.4 | lib/namna/generator.rb |