lib/phony/country.rb
def split national_number
      @codes.each do |code|
        zero, ndc, *rest = code.split national_number
        return [zero, ndc, *rest] if rest && !rest.empty?
      end
      # Best effort in error case.
      #
      [nil, national_number, []]
    end
# A number is split with the code handlers as given in the initializer.
#
# Note: If the ndc is nil, it will not return it.
#
A number is split with the code handlers as given in the initializer.
Note: If the ndc is nil, it will not return it.
A number is split with the code handlers as given in the initializer . Note : If the ndc is nil it will not return it .
def split national_number
      @codes.each do |code|
        zero, ndc, *rest = code.split national_number
        return [zero, ndc, *rest] if rest && !rest.empty?
      end
      [nil, national_number, []]
    end
def split national_number @codes . each do | code | zero , ndc , * rest = code . split national_number return [ zero , ndc , * rest ] if rest && ! rest . empty? end [ nil , national_number , [ ] ] end
A number is split with the code handlers as given in the initializer.
A number is split with the code handlers as given in the initializer .
# Best effort in error case. #
national_number