Module: Sequel::Plugins::TypecastOnLoad::InstanceMethods

Defined in:
lib/sequel/plugins/typecast_on_load.rb

Instance Method Summary collapse

Instance Method Details

#load_typecastObject

Call the setter method for each of the model’s typecast_on_load_columns with the current value, so it can be typecasted correctly.



62
63
64
65
66
67
68
69
# File 'lib/sequel/plugins/typecast_on_load.rb', line 62

def load_typecast
  model.typecast_on_load_columns.each do |c|
    if v = values[c]
      set_column_value("#{c}=", v)
    end
  end
  self
end