Method: Phonelib::Phone#types

Defined in:
lib/phonelib/phone.rb

#typesArray

Returns all phone types that matched valid patterns

Returns:

  • (Array)

    all valid phone types



65
66
67
# File 'lib/phonelib/phone.rb', line 65

def types
  @types ||= @data.flat_map { |_iso2, data| data[:valid] }.uniq
end