Module: ROM::SQL::Plugin::Timestamps::InstanceMethods 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
- .included(base) ⇒ Object private
Instance Method Summary collapse
- #datestamp_columns ⇒ Object private
-
#set_timestamps(tuples) ⇒ Array<Hash>, Hash
private
Set the timestamp attributes on the given tuples.
- #timestamp_columns ⇒ Object private
Class Method Details
.included(base) ⇒ 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.
78 79 80 |
# File 'lib/rom/sql/plugin/timestamps.rb', line 78 def self.included(base) base.before :set_timestamps end |
Instance Method Details
#datestamp_columns ⇒ 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.
88 89 90 |
# File 'lib/rom/sql/plugin/timestamps.rb', line 88 def datestamp_columns self.class.datestamp_columns end |
#set_timestamps(tuples) ⇒ Array<Hash>, Hash
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.
Set the timestamp attributes on the given tuples
99 100 101 102 103 104 105 106 107 108 |
# File 'lib/rom/sql/plugin/timestamps.rb', line 99 def (tuples) = case tuples when Hash .merge(tuples) when Array tuples.map { |t| .merge(t) } end end |
#timestamp_columns ⇒ 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.
83 84 85 |
# File 'lib/rom/sql/plugin/timestamps.rb', line 83 def self.class. end |