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.
Searching for
"def fetch"
shows me that the method is defined inlib/faker.rb
.fetch
in turn callstranslate
, which delegates toI8n.translate
.