Rgn
RGN short for Random generated name, is a ruby gem to allows users to automate random strings in their ruby apps.
Installation
Add this line to your application's Gemfile:
gem 'rgn'And then execute:
$ bundle install
Or install it yourself as:
$ gem install rgn
Usage
If you're just developing a non-rails app in ruby, then just import the following code inside your file: require 'rgn'
How to use
- Input
require 'rgn'at the beginning of the ruby file. - Input
include Rgnafter the require statement. - Next, declare a variable to contain generator function. For example,
randomStr = generateName
Then enter:puts #{randomStr} or puts randomStrto generate random string.