Sha256: 267c2158a923568fda7c570cc37960d31fb0747a52b29c5b3b60e6f9e4297b8d
Contents?: true
Size: 1.25 KB
Versions: 1
Compression:
Stored size: 1.25 KB
Contents
# RandomStrings This gem helps you generate random string of various "types" - a random email, a random date, a random Twitter handle, etc. Or just a random string. It's a great gem to use when creating seeds for database applications - like in a Rails seeds.rb file, for example. (hint, hint.) ## Installation Add this line to your application's Gemfile: gem 'random_strings' And then execute: $ bundle Or install it yourself as: $ gem install random_strings ## Usage Initialize like this: @my_gen = RandomStrings::Generator.new do |config| config.default_string_length=7 config.default_number_length=6 config.tld_list=['.net', '.my', '.ly'] end Here are a few functions you can use: @generator=RandomStrings::Generator.new a_zip=@generator.random_zip # Will look like, 40072 an_email=@generator.random_email # Will look, uuyhWAAJne@uuqVGjEaka.net These are composed from the following basic functions: RandomStrings::Generator#random_digits RandomStrings::Generator#random_string ## Contributing 1. Fork it 2. Create your feature branch (`git checkout -b my-new-feature`) 3. Commit your changes (`git commit -am 'Add some feature'`) 4. Push to the branch (`git push origin my-new-feature`) 5. Create new Pull Request
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
random_strings-0.0.1 | README.md |