Class: CommandModel::Convert::Decimal
- Inherits:
-
Object
- Object
- CommandModel::Convert::Decimal
- Defined in:
- lib/command_model/convert.rb
Instance Method Summary collapse
Instance Method Details
#call(value) ⇒ Object
42 43 44 45 46 47 |
# File 'lib/command_model/convert.rb', line 42 def call(value) return nil if value.blank? BigDecimal(value, 16) rescue StandardError => e raise ConvertError.new(e, "number") end |