Method: Webhookdb::PhoneNumber::US.format
- Defined in:
- lib/webhookdb/phone_number.rb
.format(s) ⇒ Object
22 23 24 25 |
# File 'lib/webhookdb/phone_number.rb', line 22 def self.format(s) raise ArgumentError, "#{s} must be a normalized to #{REGEXP}" unless self.valid_normalized?(s) return "(#{s[1..3]}) #{s[4..6]}-#{s[7..]}" end |