module FFaker

sourse: www.soumu.go.jp/main_sosiki/joho_tsusin/top/tel_number/number_shitei.html#kotei-denwa

Constants

BASE_LIB_PATH
HEX
LETTERS
VERSION

Public Class Methods

bothify(masks) click to toggle source
# File lib/ffaker.rb, line 30
def self.bothify(masks)
  letterify(numerify(masks))
end
hexify(*masks) click to toggle source
# File lib/ffaker.rb, line 18
def self.hexify(*masks)
  fetch_sample(masks.flatten).gsub('#') { fetch_sample(HEX) }
end
letterify(*masks) click to toggle source
# File lib/ffaker.rb, line 26
def self.letterify(*masks)
  fetch_sample(masks.flatten).gsub('?') { fetch_sample(LETTERS) }
end
numerify(*masks) click to toggle source
# File lib/ffaker.rb, line 22
def self.numerify(*masks)
  fetch_sample(masks.flatten).gsub('#') { rand(0..9).to_s }
end