Class: Float
Class Method Summary collapse
Class Method Details
.cast_from(object) ⇒ Object
153 154 155 156 157 158 |
# File 'lib/more/typecast.rb', line 153 def cast_from(object) return super rescue TypeCastException return object.to_f if object.respond_to? :to_f raise end |