module Sequel::LooserTypecasting
Private Instance Methods
_typecast_value_string_to_decimal(value)
click to toggle source
# File lib/sequel/extensions/looser_typecasting.rb 41 def _typecast_value_string_to_decimal(value) 42 BigDecimal(value) 43 rescue 44 BigDecimal('0.0') 45 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 26 def typecast_value_float(value) 27 value.to_f 28 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 31 def typecast_value_integer(value) 32 value.to_i 33 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 36 def typecast_value_string(value) 37 value.to_s 38 end