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.
41 42 43 44 |
# File 'lib/super_settings/storage/json_storage.rb', line 41 def initialize(*) @storage = nil super end |
Instance Attribute Details
#storage=(value) ⇒ Object (writeonly)
Sets the attribute storage
46 47 48 |
# File 'lib/super_settings/storage/json_storage.rb', line 46 def storage=(value) @storage = value end |
Class Method Details
.create!(attributes) ⇒ Object
34 35 36 37 38 |
# File 'lib/super_settings/storage/json_storage.rb', line 34 def create!(attributes) record = new(attributes) record.save! record end |
Instance Method Details
#created_at=(val) ⇒ Object
48 49 50 |
# File 'lib/super_settings/storage/json_storage.rb', line 48 def created_at=(val) super(TimePrecision.new(val).time) end |