Method: Formatters::FormatPhone#to
- Defined in:
- lib/formatters/format_phone.rb
#to(str, options = {}) ⇒ Object
15 16 17 18 |
# File 'lib/formatters/format_phone.rb', line 15 def to(str, = {}) return nil if str.nil? or str.empty? str.gsub(/[^0-9]/, '').to_i end |