Module: Paramore::Float
- Defined in:
- lib/paramore/types.rb
Class Method Summary collapse
Class Method Details
.[](input) ⇒ Object
20 21 22 23 24 |
# File 'lib/paramore/types.rb', line 20 def [](input) raise ArgumentError "#{input} is not a float!" unless input.to_s.match?(/-{0,1}\d*(\.\d*){0,1}/) input.to_f end |