Format your telephone numbers.
This gem is only applicable for Japanese phone number formatting.
Add this line to your application's Gemfile:
gem 'tel_formatter'
And then execute:
$ bundle
Or install it yourself as:
$ gem install tel_formatter
require 'tel_formatter'
TelFormatter.format("0312345678") #=> "03-1234-5678"
TelFormatter.format("03.1235.5678") #=> "03-1234-5678"
- Fork it ( http://github.com/iTakeshi/tel_formatter/fork )
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Write spec and run tests (
bundle exec rspec
) - Push to the branch (
git push origin my-new-feature
) - Create new Pull Request