require "pwm/version" module Pwm def self.characters [('A'..'Z'),('a'..'z'),('2'..'9')].collect{|r| r.collect{|c| c}}.flatten end def self.password(length=16) (0..length-1).inject('') do |pw, n| pw + characters[rand(characters.length)] end end end