lib/phonelib/data_importer.rb
# method adds short number patterns to main data parsed from main xml
method adds short number patterns to main data parsed from main xml
method adds short number patterns to main data parsed from main xml
def merge_short_with_main_type(country_id, type, data)
        @data[country_id][:types][type] ||= {}
        @data[country_id][:types][type][Core::SHORT] ||= {}
        data.each do |k, v|
          if @data[country_id][:types][type][Core::SHORT][k]
            @data[country_id][:types][type][Core::SHORT][k] += "|#{v}"
          else
            @data[country_id][:types][type][Core::SHORT][k] = v
          end
        end
      end
def merge_short_with_main_type ( country_id , type , data ) @data [ country_id ] [ :types ] [ type ] ||= { } @data [ country_id ] [ :types ] [ type ] [ Core :: SHORT ] ||= { } data . each do | k , v | if @data [ country_id ] [ :types ] [ type ] [ Core :: SHORT ] [ k ] @data [ country_id ] [ :types ] [ type ] [ Core :: SHORT ] [ k ] += "|#{v}" else @data [ country_id ] [ :types ] [ type ] [ Core :: SHORT ] [ k ] = v end end end
method adds short number patterns to main data parsed from main xml
method adds short number patterns to main data parsed from main xml
country_id
<not_specific>
type
<not_specific>
data
<not_specific>