Sha256: c0f560ad86e54592004c389cce5774e0735eada8762671e2fac607f55761ba7b

Contents?: true

Size: 874 Bytes

Versions: 1

Compression:

Stored size: 874 Bytes

Contents

module Faker
  VERSION = "1.4.0"

  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 :Company,     'ffaker/company'
  autoload :Education,   'ffaker/education'
  autoload :Internet,    'ffaker/internet'
  autoload :Lorem,       'ffaker/lorem'
  autoload :Name,        'ffaker/name'
  autoload :NameCN,      'ffaker/name_cn'
  autoload :PhoneNumber, 'ffaker/phone_number'
  autoload :Product,     'ffaker/product'
  autoload :Geolocation, 'ffaker/geolocation'
  autoload :VERSION,     'ffaker/version'
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
ffaker-1.4.0 lib/ffaker.rb