Skip to content

haberbyte/phoney

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

95 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

phoney

This is a library for representing phone numbers. It provides a Phoney class that can format phone numbers depending on the region you set.

Installation

Gem

gem install phoney

Source

git clone git://github.com/habermann24/phoney.git

Feature overview

  • Create phone number by parsing a string

    require 'phoney'
    # region defaults to US
    Phoney.format("+17041234567")
    # => "+1 (704) 123-4567"
    
  • Deals with many specific region formatting rules (e.g. DE)

    require 'phoney'
    
    Phoney.region = :de
    
    Phoney.format("04105456789")
    # => "04105 456789"
    

TODOs

  • More tests for different countries

About

Ruby library that parses a phone number and automatically formats it correctly, depending on the country/locale you set.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •  

Languages