Sha256: a6513a45df0012db881353df0bbb87b67a9ecfb44f1e50f481139b06cb189164

Contents?: true

Size: 679 Bytes

Versions: 5

Compression:

Stored size: 679 Bytes

Contents

module Faker
  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 :Internet,    'ffaker/internet'
  autoload :Lorem,       'ffaker/lorem'
  autoload :Name,        'ffaker/name'
  autoload :PhoneNumber, 'ffaker/phone_number'
  autoload :VERSION,     'ffaker/version'
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
ffaker-0.3.7 lib/ffaker.rb
ffaker-0.3.6 lib/ffaker.rb
ffaker-0.3.5 lib/ffaker.rb
ffaker-0.3.4 lib/ffaker.rb
ffaker-0.3.3 lib/ffaker.rb