lib/phonelib/phone_analyzer_helper.rb
# checks if types has both :mobile and :fixed_line and replaces it with
# :fixed_or_mobile in case both present
checks if types has both :mobile and :fixed_line and replaces it with
:fixed_or_mobile in case both present
checks if types has both : mobile and : fixed_line and replaces it with : fixed_or_mobile in case both present
def sanitize_fixed_mobile(types)
      fixed_mobile = [Core::FIXED_LINE, Core::MOBILE]
      [:possible, :valid].each do |key|
        if (fixed_mobile - types[key]).empty?
          types[key] = types[key] - fixed_mobile + [Core::FIXED_OR_MOBILE]
        end
      end
      types
    end
def sanitize_fixed_mobile ( types ) fixed_mobile = [ Core :: FIXED_LINE , Core :: MOBILE ] [ :possible , :valid ] . each do | key | if ( fixed_mobile - types [ key ] ) . empty? types [ key ] = types [ key ] - fixed_mobile + [ Core :: FIXED_OR_MOBILE ] end end types end
checks if types has both :mobile and :fixed_line and replaces it with
:fixed_or_mobile in case both present
checks if types has both : mobile and : fixed_line and replaces it with : fixed_or_mobile in case both present
types
<not_specific>