Class: HappyPhoneNumber::FrFormat
- Inherits:
-
BaseFormat
- Object
- BaseFormat
- HappyPhoneNumber::FrFormat
- Defined in:
- lib/happy_phone_number/fr_format.rb
Overview
Format for french phone numbers.
Instance Method Summary collapse
-
#format ⇒ Object
Format the phone number given french convention.
Methods inherited from BaseFormat
Constructor Details
This class inherits a constructor from HappyPhoneNumber::BaseFormat
Instance Method Details
#format ⇒ Object
Format the phone number given french convention.
Returns the String formatted phone number.
11 12 13 14 15 16 17 18 |
# File 'lib/happy_phone_number/fr_format.rb', line 11 def format if @type == :national make_happy '22222' else internationalize_with('33') { @phone.slice!(0) } make_happy '312222' end end |