Sha256: efc974a52dc48a3d9c5a4c1cd711399a089741d2c24f024af8a65aa4d46ec7d9

Contents?: true

Size: 1.33 KB

Versions: 1

Compression:

Stored size: 1.33 KB

Contents

module Faker
  VERSION = "1.10.1"

  require 'ffaker/utils/module_utils'

  extend ModuleUtils

 LETTERS = k('a'..'z')

  def self.numerify(number_string)
    number_string.gsub!(/#/) { rand(10).to_s }
    number_string
  end

  def self.letterify(letter_string)
    letter_string.gsub!(/\?/) { LETTERS.rand }
    letter_string
  end

  def self.bothify(string)
    letterify(numerify(string))
  end

  autoload :Address,       'ffaker/address'
  autoload :AddressDE,     'ffaker/address_de'
  autoload :AddressCA,     'ffaker/address_ca'
  autoload :Company,       'ffaker/company'
  autoload :Education,     'ffaker/education'
  autoload :Geolocation,   'ffaker/geolocation'
  autoload :HTMLIpsum,     'ffaker/html_ipsum'
  autoload :HipsterIpsum,  'ffaker/hipster_ipsum'
  autoload :Internet,      'ffaker/internet'
  autoload :Lorem,         'ffaker/lorem'
  autoload :LoremCN,       'ffaker/lorem_cn'
  autoload :Name,          'ffaker/name'
  autoload :NameCN,        'ffaker/name_cn'
  autoload :NameDE,        'ffaker/name_de'
  autoload :NameJA,        'ffaker/name_ja'
  autoload :NameRU,        'ffaker/name_ru'
  autoload :NameSN,        'ffaker/name_sn'
  autoload :PhoneNumber,   'ffaker/phone_number'
  autoload :PhoneNumberSN, 'ffaker/phone_number_sn'
  autoload :Product,       'ffaker/product'
  autoload :VERSION,       'ffaker/version'
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
ffaker-1.10.1 lib/ffaker.rb