William Djaja Tjokroaminata <billtj / y.glue.umd.edu> writes:

> Really, I want the 'rate' and 'delay' to be of class Float and nothing
> else.

> Can you provide some idea on how to better deal with user input error
> using probably some Ruby paradigm?

Perhaps:

    def my_method(rate, delay, ...)
      wibble(rate.to_f, delay.to_f, ....)


Here you're not insisting that 'rate' and 'delay' are floats, but
instead that they can yield float values: that they can behave as
floats.


Cheers


Dave