Class: SuperSettings::Storage::NullStorage
- Inherits:
-
Object
- Object
- SuperSettings::Storage::NullStorage
show all
- Includes:
- SuperSettings::Storage
- Defined in:
- lib/super_settings/storage/null_storage.rb
Overview
No-op implementation of the SuperSettings::Storage model. You can use this model if there is no other storage engine available. It can be useful for situations where the normal storage engine is not available, such as in a continious integration environment.
Class Attribute Summary collapse
Instance Attribute Summary collapse
Class Method Summary
collapse
Instance Method Summary
collapse
#==, #create_history, included
Class Attribute Details
.settings ⇒ Object
Returns the value of attribute settings.
16
17
18
|
# File 'lib/super_settings/storage/null_storage.rb', line 16
def settings
@settings
end
|
Instance Attribute Details
#changed_by ⇒ Object
Returns the value of attribute changed_by.
13
14
15
|
# File 'lib/super_settings/storage/null_storage.rb', line 13
def changed_by
@changed_by
end
|
#created_at ⇒ Object
Returns the value of attribute created_at.
13
14
15
|
# File 'lib/super_settings/storage/null_storage.rb', line 13
def created_at
@created_at
end
|
#description ⇒ Object
Returns the value of attribute description.
13
14
15
|
# File 'lib/super_settings/storage/null_storage.rb', line 13
def description
@description
end
|
#key ⇒ Object
Returns the value of attribute key.
13
14
15
|
# File 'lib/super_settings/storage/null_storage.rb', line 13
def key
@key
end
|
#raw_value ⇒ Object
Returns the value of attribute raw_value.
13
14
15
|
# File 'lib/super_settings/storage/null_storage.rb', line 13
def raw_value
@raw_value
end
|
#updated_at ⇒ Object
Returns the value of attribute updated_at.
13
14
15
|
# File 'lib/super_settings/storage/null_storage.rb', line 13
def updated_at
@updated_at
end
|
#value_type ⇒ Object
Returns the value of attribute value_type.
13
14
15
|
# File 'lib/super_settings/storage/null_storage.rb', line 13
def value_type
@value_type
end
|
Class Method Details
.all ⇒ Object
25
26
27
|
# File 'lib/super_settings/storage/null_storage.rb', line 25
def all
[]
end
|
.create_history(key:, changed_by:, created_at:, value: nil, deleted: false) ⇒ Object
41
42
43
|
# File 'lib/super_settings/storage/null_storage.rb', line 41
def create_history(key:, changed_by:, created_at:, value: nil, deleted: false)
nil
end
|
.destroy_all ⇒ Object
22
23
|
# File 'lib/super_settings/storage/null_storage.rb', line 22
def destroy_all
end
|
.find_by_key(key) ⇒ Object
33
34
35
|
# File 'lib/super_settings/storage/null_storage.rb', line 33
def find_by_key(key)
nil
end
|
.history(key) ⇒ Object
18
19
20
|
# File 'lib/super_settings/storage/null_storage.rb', line 18
def history(key)
[]
end
|
.last_updated_at ⇒ Object
37
38
39
|
# File 'lib/super_settings/storage/null_storage.rb', line 37
def last_updated_at
nil
end
|
.load_asynchronous? ⇒ Boolean
45
46
47
|
# File 'lib/super_settings/storage/null_storage.rb', line 45
def load_asynchronous?
false
end
|
.updated_since(time) ⇒ Object
29
30
31
|
# File 'lib/super_settings/storage/null_storage.rb', line 29
def updated_since(time)
[]
end
|
Instance Method Details
#deleted=(value) ⇒ Object
58
59
|
# File 'lib/super_settings/storage/null_storage.rb', line 58
def deleted=(value)
end
|
#deleted? ⇒ Boolean
61
62
63
|
# File 'lib/super_settings/storage/null_storage.rb', line 61
def deleted?
false
end
|
#history(limit: nil, offset: 0) ⇒ Object
50
51
52
|
# File 'lib/super_settings/storage/null_storage.rb', line 50
def history(limit: nil, offset: 0)
[]
end
|
#persisted? ⇒ Boolean
65
66
67
|
# File 'lib/super_settings/storage/null_storage.rb', line 65
def persisted?
false
end
|
#save! ⇒ Object
54
55
56
|
# File 'lib/super_settings/storage/null_storage.rb', line 54
def save!
true
end
|