Class: Imposter::Phone

Inherits:
Object
  • Object
show all
Defined in:
lib/imposter/phone.rb

Constant Summary collapse

Formats =
[
   '###-###-####',
  '(###)###-####',
  '1-###-###-####',
  '###.###.####',
  '###-###-####',
  '(###)###-####',
  '1-###-###-####',
  '###.###.####',
  '###-###-#### x###',
  '(###)###-#### x###',
  '1-###-###-#### x###',
  '###.###.#### x###',
  '###-###-#### x####',
  '(###)###-#### x####',
  '1-###-###-#### x####',
  '###.###.#### x####',
  '###-###-#### x#####',
  '(###)###-#### x#####',
  '1-###-###-#### x#####',
  '###.###.#### x#####'
]

Class Method Summary collapse

Class Method Details

.number(format = nil) ⇒ Object



8
9
10
11
12
13
14
# File 'lib/imposter/phone.rb', line 8

def number(format=nil)
  if not format.nil? then
Imposter.numerify(format)
  else
Imposter.numerify(Formats.rand)
  end
end