demarches-normaliennes/app/services/number_service.rb

6 lines
102 B
Ruby
Raw Normal View History

class NumberService
def self.to_number string
string.to_s if Float(string) rescue nil
end
2017-04-04 15:27:04 +02:00
end