demarches-normaliennes/app/services/number_service.rb

5 lines
101 B
Ruby
Raw Normal View History

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