class String
Public Instance Methods
to_num()
click to toggle source
# File lib/credit_card_sms_parser.rb, line 5 def to_num if self[0] == '-' (self[0] + self[1..-1].gsub(/\D/, '')).to_i else self.gsub(/\D/, '').to_i end end