Module: Paramore::Float
- Defined in:
- lib/paramore/types.rb
Class Method Summary collapse
Class Method Details
.[](input) ⇒ Object
27 28 29 30 31 |
# File 'lib/paramore/types.rb', line 27 def [](input) raise ArgumentError "#{input} is not a Float!" unless input.to_s.match?(TypeRegexes::FLOAT_REGEX) input.to_f end |