lib/phonelib/phone_analyzer_helper.rb
# checks if country can have numbers with double country prefixes
#
# ==== Attributes
#
# * +data+ - country data used for parsing
# * +phone+ - phone number being parsed
# * +parsed+ - parsed regex match for phone
checks if country can have numbers with double country prefixes
Attributes


checks if country can have numbers with double country prefixes Attributes
def double_prefix_allowed?(data, phone, parsed = {})
      data[Core::DOUBLE_COUNTRY_PREFIX_FLAG] &&
        phone =~ cr("^#{data[Core::COUNTRY_CODE]}") &&
        parsed && (parsed[:valid].nil? || parsed[:valid].empty?) &&
        !original_starts_with_plus?
    end
def double_prefix_allowed? ( data , phone , parsed = { } ) data [ Core :: DOUBLE_COUNTRY_PREFIX_FLAG ] && phone =~ cr ( "^#{data[Core::COUNTRY_CODE]}" ) && parsed && ( parsed [ :valid ] . nil? || parsed [ :valid ] . empty? ) && ! original_starts_with_plus? end
checks if country can have numbers with double country prefixes
 Attributes
checks if country can have numbers with double country prefixes Attributes
data
<not_specific>
phone
<not_specific>
parsed
<not_specific>