class FakeData::Method::Faker
Constants
- FAKER_MATCH
Private Instance Methods
parse_klass(klass_string)
click to toggle source
Calls superclass method
FakeData::Method#parse_klass
# File lib/fake_data/method/faker.rb, line 12 def parse_klass klass_string raise_custom NameError, "missing faker class" unless klass_string klass = super(klass_string) klass = "::Faker#{klass}" unless klass =~ FAKER_MATCH klass end
raise_custom(error, reason)
click to toggle source
# File lib/fake_data/method/faker.rb, line 8 def raise_custom error, reason raise error, "FakeData: can't parse '#{raw}'. Reason: #{reason}. For usage see: https://github.com/stympy/faker" end