Class: Formalism::Form::Coercion::Float

Inherits:
Numeric show all
Defined in:
lib/formalism/form/coercion/float.rb

Overview

Class for coercion to Float

Direct Known Subclasses

BigDecimal

Constant Summary collapse

VALUE_REGEXP =

stackoverflow.com/a/36946626/2630849 and improvements for ‘BigDecimal` (e-notation)

wrap_value_regexp '[-+]?(?:\d+(?:\.\d*)?|\.\d+)(?:e[-+]?\d+)?'
CONVERSION_METHOD =
:to_f

Method Summary

Methods inherited from Base

#initialize, #result

Constructor Details

This class inherits a constructor from Formalism::Form::Coercion::Base