Module: Sequel::Plugins::Timestamps::ClassMethods

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#create_timestamp_fieldObject (readonly)

The field to store the create timestamp



40
41
42
# File 'lib/sequel/plugins/timestamps.rb', line 40

def create_timestamp_field
  @create_timestamp_field
end

#update_timestamp_fieldObject (readonly)

The field to store the update timestamp



43
44
45
# File 'lib/sequel/plugins/timestamps.rb', line 43

def update_timestamp_field
  @update_timestamp_field
end

Instance Method Details

#create_timestamp_overwrite?Boolean

Whether to overwrite the create timestamp if it already exists

Returns:

  • (Boolean)


46
47
48
# File 'lib/sequel/plugins/timestamps.rb', line 46

def create_timestamp_overwrite?
  @create_timestamp_overwrite
end

#set_update_timestamp_on_create?Boolean

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

Returns:

  • (Boolean)


54
55
56
# File 'lib/sequel/plugins/timestamps.rb', line 54

def set_update_timestamp_on_create?
  @set_update_timestamp_on_create
end