Method: XlsFunction::Converters::NumberConverter.try_convert
- Defined in:
- lib/xls_function/converters/number_converter.rb
.try_convert(input) ⇒ Object
5 6 7 8 9 10 |
# File 'lib/xls_function/converters/number_converter.rb', line 5 def try_convert(input) [false, nil] unless input.respond_to?(:to_d) [false, nil] if input.is_a?(String) && !numberable_string?(input) [true, input.to_d] end |