0

I'm trying to understand how the Faker rails gem works, so hopefully I can contribute to it. The project is found here: https://github.com/stympy/faker

Under ~/lib/faker/name.rb there will be code like this:

def first_name; fetch('name.first_name'); end

My problem is I don't understand where the hash with all the "name.first_name" is located.

userFriendly
  • 474
  • 3
  • 14

1 Answers1

1

Searching for "def fetch" shows me that the method is defined in lib/faker.rb.

fetch in turn calls translate, which delegates to I8n.translate.

fylooi
  • 3,840
  • 14
  • 24