Class: HappyPhoneNumber::BaseFormat

Inherits:
Object
  • Object
show all
Defined in:
lib/happy_phone_number/base_format.rb

Overview

Internal: Base class for specific country formatter.

Direct Known Subclasses

BeFormat, DkFormat, FrFormat, IsFormat

Instance Method Summary collapse

Constructor Details

#initialize(phone, type, separator) ⇒ BaseFormat

Internal: Initialize a new base formatter.

phone - A String phone number to format. type - Either :national or :international. separator - A String separator to put into each groups of digit.



13
14
15
16
17
# File 'lib/happy_phone_number/base_format.rb', line 13

def initialize phone, type, separator
  @phone = phone
  @type = type
  @separator = separator
end