Module: AQL::NumberFormat
- Defined in:
- lib/aql_sms_api.rb
Class Method Summary collapse
Class Method Details
.uk(number) ⇒ Object
71 72 73 74 75 76 |
# File 'lib/aql_sms_api.rb', line 71 def self.uk(number) number. gsub(/\D/, ""). # removes all non digit characters gsub(/^00([1-9]{2})/, "\\1"). # asumes numbers beginning 00 are int and strips leading 00 gsub(/^0([1-9])/, "44\\1") # removes leading 0 and add international code end |