module Sequel::LooserTypecasting
Private Instance Methods
_typecast_value_string_to_decimal(value)
click to toggle source
# File lib/sequel/extensions/looser_typecasting.rb 38 def _typecast_value_string_to_decimal(value) 39 BigDecimal(value) 40 rescue 41 BigDecimal('0.0') 42 end
typecast_value_float(value)
click to toggle source
Typecast the value to a Float using to_f instead of Kernel.Float
# File lib/sequel/extensions/looser_typecasting.rb 23 def typecast_value_float(value) 24 value.to_f 25 end
typecast_value_integer(value)
click to toggle source
Typecast the value to an Integer using to_i instead of Kernel.Integer
# File lib/sequel/extensions/looser_typecasting.rb 28 def typecast_value_integer(value) 29 value.to_i 30 end
typecast_value_string(value)
click to toggle source
Typecast the value to an String
using to_s instead of Kernel.String
# File lib/sequel/extensions/looser_typecasting.rb 33 def typecast_value_string(value) 34 value.to_s 35 end