class Seria::BigDecimalConverter
Attributes
type[R]
value[R]
Public Class Methods
new(value, type)
click to toggle source
# File lib/seria/converters.rb, line 53 def initialize(value, type) @value, @type = value, type end
Public Instance Methods
convert()
click to toggle source
# File lib/seria/converters.rb, line 57 def convert if value && !value.is_a?(BigDecimal) value.to_d else value end end
to_db()
click to toggle source
# File lib/seria/converters.rb, line 65 def to_db value end