Module: LCBO::CrawlKit::PhoneHelper

Defined in:
lib/lcbo/crawlkit/phone_helper.rb

Class Method Summary collapse

Class Method Details

.[](value) ⇒ Object



5
6
7
8
9
# File 'lib/lcbo/crawlkit/phone_helper.rb', line 5

def self.[](value)
  return if '' == value.to_s.strip
  m = value.gsub(/[^0-9]/, '')
  "(#{m[0,3]}) #{m[3,3]}-#{m[6,4]}"
end