module Platformx::FakerHelpers
Faker helpers
@author Tim Mushen
Public Instance Methods
Faker Birthday @return [String] fake birthday
# File lib/platformx/faker.rb, line 71 def x_faker_birthday() return Faker::Time.between(15.years.ago, 5.years.ago) end
Faker Boolean @return [Boolean] fake boolean
# File lib/platformx/faker.rb, line 84 def x_faker_boolean() return Faker::Boolean.boolean(0.2) end
Faker Chars @param length [Integer] length of the char string @return [String] fake char string
# File lib/platformx/faker.rb, line 107 def x_faker_characters(length: 10) return Faker::Lorem.characters(length) end
Faker City @return [String] fake city
# File lib/platformx/faker.rb, line 35 def x_faker_city() return Faker::Address.city end
Faker Email @return [String] fake email
# File lib/platformx/faker.rb, line 11 def x_faker_email() return Faker::Internet.safe_email end
Faker First Name @return [String] fake first name
# File lib/platformx/faker.rb, line 17 def x_faker_first_name() return Faker::Name.first_name end
Faker Full Name @return [String] fake full name
# File lib/platformx/faker.rb, line 113 def x_faker_full_name() return Faker::Name.name end
Faker Last Name @return [String] fake last name
# File lib/platformx/faker.rb, line 23 def x_faker_last_name() return Faker::Name.last_name end
Faker Number @param length [Integer] length of the number @return [String] fake number
# File lib/platformx/faker.rb, line 78 def x_faker_number(length: 2) return Faker::Number.number(length) end
Faker Password @return [String] fake password
# File lib/platformx/faker.rb, line 59 def x_faker_password() return Faker::Internet.password end
Faker Phone @return [String] fake phone
# File lib/platformx/faker.rb, line 53 def x_faker_phone() return Faker::PhoneNumber.phone_number end
Faker Price @return [String] fake price @example
x_faker_price # -> 45.5
# File lib/platformx/faker.rb, line 100 def x_faker_price() return Faker::Commerce.price end
Faker Range @param low [Integer] the minimum of the range @param high [Integer] the highest value of the range @return [Integer] fake integer between given values
# File lib/platformx/faker.rb, line 92 def x_faker_range(low:1, high:10) return Faker::Number.between(low, high) end
Faker State @return [String] fake state
# File lib/platformx/faker.rb, line 41 def x_faker_state() return Faker::Address.state_abbr end
Faker Street Address @return [String] fake street address
# File lib/platformx/faker.rb, line 29 def x_faker_street_address() return Faker::Address.street_address end
Faker UUID @return [String] fake uuid
# File lib/platformx/faker.rb, line 65 def x_faker_uuid() return UUIDTools::UUID.random_create end
Faker Zip @return [String] fake zip
# File lib/platformx/faker.rb, line 47 def x_faker_zip() return Faker::Address.zip end