faker

https://github.com/stympy/faker

Ruby

A library for generating fake data such as names, addresses, and phone numbers.

Faker::Base.method_missing

You can add whatever you want to the locale file, and it will get caught here.
E.g., in your locale file, create a
  name:
    girls_name: ["Alice", "Cheryl", "Tatiana"]
Then you can call Faker::Name.girls_name and it will act like #first_name

Source | Google | Stack overflow

Edit

git clone [email protected]:stympy/faker.git

cd faker

open lib/faker.rb

Contribute

# Make a new branch

git checkout -b -your-name--update-docs-Faker--Base-method_missing-for-pr


# Commit to git

git add lib/faker.rbgit commit -m "better docs for Faker::Base.method_missing"


# Open pull request

gem install hub # on a mac you can `brew install hub`

hub fork

git push <your name> -your-name--update-docs-Faker--Base-method_missing-for-pr

hub pull-request


# Celebrate!