Module: Sequel::Plugins::TypecastOnLoad::ClassMethods

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

Instance Attribute Summary (collapse)

Instance Method Summary (collapse)

Instance Attribute Details

- (Object) typecast_on_load_columns (readonly)

The columns to typecast on load for this model.



32
33
34
# File 'lib/sequel/plugins/typecast_on_load.rb', line 32

def typecast_on_load_columns
  @typecast_on_load_columns
end

Instance Method Details

- (Object) add_typecast_on_load_columns(*columns)

Add additional columns to typecast on load for this model.



35
36
37
# File 'lib/sequel/plugins/typecast_on_load.rb', line 35

def add_typecast_on_load_columns(*columns)
  @typecast_on_load_columns.concat(columns)
end

- (Object) call(values)

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



41
42
43
# File 'lib/sequel/plugins/typecast_on_load.rb', line 41

def call(values)
  super.load_typecast
end