Methods
Public Instance methods
this allows a new string to be created that consists of ’’n’’ random characters of the source string.
[ show source ]
# File lib/captcha.rb, line 30
30: def random( new_length )
31: s = ""
32: new_length.times { s << self[rand(length),1] }
33: s
34: end