.format(phone_number, options = {}) ⇒ ObjectAlso known as:
formatted

Formats a E164 number according to local customs.

Raises:

(ArgumentError)

119
120
121
122

# File 'lib/phony.rb', line 119defformatphone_number,options={}raiseArgumentError,"Phone number cannot be nil. Use e.g. number && Phony.format(number)."unlessphone_numberformat!phone_number.dup,optionsend

.normalize(phone_number, options = {}) ⇒ Object

Normalizes the given number.

Useful before inserting the number into a database.

Raises:

(ArgumentError)

95
96
97
98

# File 'lib/phony.rb', line 95defnormalizephone_number,options={}raiseArgumentError,"Phone number cannot be nil. Use e.g. number && Phony.normalize(number)."unlessphone_numbernormalize!phone_number.dup,optionsend