Class: Float

Inherits:
Object show all
Defined in:
lib/mongo_doc/ext/numeric.rb

Class Method Summary collapse

Class Method Details

.cast_from_string(string) ⇒ Object



8
9
10
# File 'lib/mongo_doc/ext/numeric.rb', line 8

def self.cast_from_string(string)
  string.to_f unless string.blank?
end