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