Module: RandomString
- Included in:
- String
- Defined in:
- lib/erp_base_erp_svcs/extensions/core/string.rb
Instance Method Summary collapse
Instance Method Details
#random(size = 25) ⇒ Object
29 30 31 32 |
# File 'lib/erp_base_erp_svcs/extensions/core/string.rb', line 29 def random(size=25) charset = %w{A C D E F G H J K M N P Q R T V W X Y Z} (0...size).map{ charset.to_a[rand(charset.size)] }.join end |