Module: ROM::SQL::Plugin::Timestamps::ClassInterface Private
- Defined in:
- lib/rom/sql/plugin/timestamps.rb
This module is part of a private API. You should avoid using this module if possible, as it may be removed or be changed in the future.
Class Method Summary collapse
- .extended(klass) ⇒ Object private
Instance Method Summary collapse
-
#datestamps(*args) ⇒ Object
(also: #datestamp)
Set up attributes to datestamp when the command is called.
-
#timestamps(*args) ⇒ Object
(also: #timestamp)
Set up attributes to timestamp when the command is called.
Class Method Details
.extended(klass) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
19 20 21 22 23 24 25 |
# File 'lib/rom/sql/plugin/timestamps.rb', line 19 def self.extended(klass) klass.defines :timestamp_columns, :datestamp_columns klass. Set.new klass.datestamp_columns Set.new super end |
Instance Method Details
#datestamps(*args) ⇒ Object Also known as: datestamp
Set up attributes to datestamp when the command is called
68 69 70 71 72 |
# File 'lib/rom/sql/plugin/timestamps.rb', line 68 def datestamps(*args) datestamp_columns datestamp_columns.merge(args) include InstanceMethods end |
#timestamps(*args) ⇒ Object Also known as: timestamp
Set up attributes to timestamp when the command is called
44 45 46 47 48 |
# File 'lib/rom/sql/plugin/timestamps.rb', line 44 def (*args) .merge(args) include InstanceMethods end |