Class: SuperSettings::Storage::JSONStorage::HistoryStorage
- Inherits:
-
HistoryAttributes
- Object
- HistoryAttributes
- SuperSettings::Storage::JSONStorage::HistoryStorage
- Defined in:
- lib/super_settings/storage/json_storage.rb
Instance Attribute Summary collapse
-
#storage ⇒ Object
writeonly
Sets the attribute storage.
Attributes inherited from HistoryAttributes
#changed_by, #created_at, #deleted, #key, #value
Class Method Summary collapse
Instance Method Summary collapse
- #created_at=(val) ⇒ Object
-
#initialize ⇒ HistoryStorage
constructor
A new instance of HistoryStorage.
- #save! ⇒ Object
Methods inherited from HistoryAttributes
Methods included from Attributes
Constructor Details
#initialize ⇒ HistoryStorage
Returns a new instance of HistoryStorage.
30 31 32 33 |
# File 'lib/super_settings/storage/json_storage.rb', line 30 def initialize(*) @storage = nil super end |
Instance Attribute Details
#storage=(value) ⇒ Object (writeonly)
Sets the attribute storage
35 36 37 |
# File 'lib/super_settings/storage/json_storage.rb', line 35 def storage=(value) @storage = value end |
Class Method Details
.create!(attributes) ⇒ Object
23 24 25 26 27 |
# File 'lib/super_settings/storage/json_storage.rb', line 23 def create!(attributes) record = new(attributes) record.save! record end |
Instance Method Details
#created_at=(val) ⇒ Object
37 38 39 |
# File 'lib/super_settings/storage/json_storage.rb', line 37 def created_at=(val) super(TimePrecision.new(val).time) end |