Method: Rsmart::ETL.parse_float
- Defined in:
- lib/rsmart_toolbox/etl.rb
.parse_float(str, opt = {}) ⇒ Float?
Note:
Note the behavioral difference versus #to_f.
Parse a Float from a String.
256 257 258 259 260 261 262 263 |
# File 'lib/rsmart_toolbox/etl.rb', line 256 def self.parse_float(str, opt={}) s = parse_string str, opt if s.empty? return nil; else return s.to_f end end |