lib/phony/country_codes.rb
def format_cc_ndc_local format, space, cc, zero, ndc, *parts
      cc_ndc = format_cc_ndc format, space, cc, zero, ndc
      local  = if parts.empty?
                 cc_ndc = cc_ndc.slice 0...cc_ndc.rindex(space.to_s)
                 EMPTY_STRING
               else
                 format_local(space, parts) unless parts.empty?
               end
      cc_ndc.empty?? local : "#{cc_ndc}#{space}#{local}"
    end
# Formats country code and national destination code.
#
Formats country code and national destination code.
Formats country code and national destination code .
def format_cc_ndc_local format, space, cc, zero, ndc, *parts
      cc_ndc = format_cc_ndc format, space, cc, zero, ndc
      local  = if parts.empty?
                 cc_ndc = cc_ndc.slice 0...cc_ndc.rindex(space.to_s)
                 EMPTY_STRING
               else
                 format_local(space, parts) unless parts.empty?
               end
      cc_ndc.empty?? local : "#{cc_ndc}#{space}#{local}"
    end
def format_cc_ndc_local format , space , cc , zero , ndc , * parts cc_ndc = format_cc_ndc format , space , cc , zero , ndc local = if parts . empty? cc_ndc = cc_ndc . slice 0 ... cc_ndc . rindex ( space . to_s ) EMPTY_STRING else format_local ( space , parts ) unless parts . empty? end cc_ndc . empty? ? local : "#{cc_ndc}#{space}#{local}" end
Formats country code and national destination code.
Formats country code and national destination code .
format
space
cc
zero
ndc
parts