Class Index [+]

Quicksearch

Sequel::Plugins::TypecastOnLoad::InstanceMethods

Public Instance Methods

load_typecast() click to toggle source

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

    # File lib/sequel/plugins/typecast_on_load.rb, line 49
49:         def load_typecast
50:           model.typecast_on_load_columns.each do |c|
51:             if v = values[c]
52:               send("#{c}=", v)
53:             end
54:           end
55:           changed_columns.clear
56:           self
57:         end
set_values(values) click to toggle source

Typecast values using # when the values are retrieved from the database.

    # File lib/sequel/plugins/typecast_on_load.rb, line 61
61:         def set_values(values)
62:           ret = super
63:           load_typecast
64:           ret
65:         end

Disabled; run with --debug to generate this.

[Validate]

Generated with the Darkfish Rdoc Generator 1.1.6.