Class: String

Inherits:
Object
  • Object
show all
Defined in:
lib/CryptoPriceFinder/crypto.rb

Instance Method Summary collapse

Instance Method Details

#commaObject



4
5
6
# File 'lib/CryptoPriceFinder/crypto.rb', line 4

def comma
  self.to_s.reverse.scan(/(?:\d*\.)?\d{1,3}-?/).join(',').reverse
end