aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib/active_support/number_helper/number_to_phone_converter.rb
Commit message (Collapse)AuthorAgeFilesLines
* Use frozen-string-literal in ActiveSupportKir Shatrov2017-07-091-0/+1
|
* Revert "Merge pull request #29540 from kirs/rubocop-frozen-string"Matthew Draper2017-07-021-1/+0
| | | | | This reverts commit 3420a14590c0e6915d8b6c242887f74adb4120f9, reversing changes made to afb66a5a598ce4ac74ad84b125a5abf046dcf5aa.
* Merge pull request #29540 from kirs/rubocop-frozen-stringMatthew Draper2017-07-021-0/+1
|\ | | | | | | Enforce frozen string in Rubocop
| * Enforce frozen string in RubocopKir Shatrov2017-07-011-0/+1
| |
* | Make ActiveSupport frozen string literal friendly.Pat Allan2017-06-201-1/+1
|/ | | | | | | The ActiveSupport test suite only passes currently if it uses the latest unreleased commits for dalli, and a patch for Builder: https://github.com/tenderlove/builder/pull/6 Beyond that, all external dependencies (at least, to the extent they’re used by ActiveSupport) are happy, including Nokogiri as of 1.8.0.
* Add more rubocop rules about whitespacesRafael Mendonça França2016-10-291-1/+1
|
* applies remaining conventions across the projectXavier Noria2016-08-061-1/+0
|
* normalizes indentation and whitespace across the projectXavier Noria2016-08-061-1/+0
|
* `number_to_phone` formats number with regexpPan GaoYong2016-04-021-2/+11
| | | | | | | | | | | | By default, this method formats US number. This commit extends its functionality to format number for other countries with a custom regular expression. number_to_phone(18812345678, pattern: /(\d{3})(\d{4})(\d{4})/) # => 188-1234-5678 The output phone number is divided into three groups, so the regexp should also match three groups of numbers.
* Nodoc missing number helper classes in AS [ci skip]Carlos Antonio da Silva2013-12-111-1/+1
| | | | These classes are not meant to be public.
* Change delimiter check order: first check if it is presentCarlos Antonio da Silva2013-12-031-3/+3
| | | | | | | This reads a lot better, and we won't need to try start_with? for blank delimiters. Also rename method name to read better.
* Make both conversion methods work similarlyCarlos Antonio da Silva2013-12-031-1/+2
| | | | | The conversion without area code already changed the passed number in place, so change the other method to do the same.
* Remove useless empty stringCarlos Antonio da Silva2013-12-031-2/+1
|
* No need for #tapCarlos Antonio da Silva2013-12-031-4/+3
|
* Stop using local variables everywhere, make use of the readerCarlos Antonio da Silva2013-12-031-1/+1
|
* :sicssors:Rafael Mendonça França2013-12-021-1/+0
|
* Make load of NumberHelper thread safeRafael Mendonça França2013-12-021-0/+51