Module: XlsFunction::Converter
- Defined in:
- lib/xls_function/converter.rb
Constant Summary collapse
- MAPS =
{ number: Converters::NumberConverter, date: Converters::DateConverter, time: Converters::TimeConverter }.freeze
Class Method Summary collapse
Class Method Details
.try_convert_to(type, value) ⇒ Object
16 17 18 19 20 21 |
# File 'lib/xls_function/converter.rb', line 16 def try_convert_to(type, value) converter = MAPS[type] return [false, "unsupported_type:#{type}"] unless converter converter.try_convert(value) end |