demarches-normaliennes/app/services/number_service.rb
2017-04-04 16:59:38 +02:00

5 lines
102 B
Ruby

class NumberService
def self.to_number string
string.to_s if Float(string) rescue nil
end
end