Module Sequel::Plugins::Timestamps::ClassMethods
In: lib/sequel/plugins/timestamps.rb

Methods

Attributes

create_timestamp_field  [R]  The field to store the create timestamp
update_timestamp_field  [R]  The field to store the update timestamp

Public Instance methods

Whether to overwrite the create timestamp if it already exists

[Source]

    # File lib/sequel/plugins/timestamps.rb, line 46
46:         def create_timestamp_overwrite?
47:           @create_timestamp_overwrite
48:         end

Copy the class instance variables used from the superclass to the subclass

[Source]

    # File lib/sequel/plugins/timestamps.rb, line 51
51:         def inherited(subclass)
52:           super
53:           [:@create_timestamp_field, :@update_timestamp_field, :@create_timestamp_overwrite, :@set_update_timestamp_on_create].each do |iv|
54:             subclass.instance_variable_set(iv, instance_variable_get(iv))
55:           end
56:         end

Whether to set the update timestamp to the create timestamp when creating

[Source]

    # File lib/sequel/plugins/timestamps.rb, line 59
59:         def set_update_timestamp_on_create?
60:           @set_update_timestamp_on_create
61:         end

[Validate]