Class: HappyPhoneNumber::DkFormat

Inherits:
BaseFormat show all
Defined in:
lib/happy_phone_number/dk_format.rb

Overview

Format phone numbers from Denmark.

Instance Method Summary collapse

Methods inherited from BaseFormat

#initialize

Constructor Details

This class inherits a constructor from HappyPhoneNumber::BaseFormat

Instance Method Details

#formatObject

Format the phone number given danish convention.

Returns the String formatted phone number.



11
12
13
14
15
16
17
18
# File 'lib/happy_phone_number/dk_format.rb', line 11

def format
  if @type == :national
    make_happy '2222'
  else
    internationalize_with '45'
    make_happy '32222'
  end
end