Class: SuperSettings::Storage::StorageAttributes
- Inherits:
-
Object
- Object
- SuperSettings::Storage::StorageAttributes
- Includes:
- SuperSettings::Storage
- Defined in:
- lib/super_settings/storage/storage_attributes.rb
Overview
Generic class that can be extended to represent a setting in memory.
Direct Known Subclasses
Instance Attribute Summary collapse
-
#created_at ⇒ Object
Returns the value of attribute created_at.
-
#description ⇒ Object
Returns the value of attribute description.
-
#key ⇒ Object
Returns the value of attribute key.
-
#raw_value ⇒ Object
Returns the value of attribute raw_value.
-
#updated_at ⇒ Object
Returns the value of attribute updated_at.
-
#value_type ⇒ Object
Returns the value of attribute value_type.
Instance Method Summary collapse
- #deleted=(val) ⇒ Object
- #deleted? ⇒ Boolean
-
#initialize(attributes = nil) ⇒ StorageAttributes
constructor
A new instance of StorageAttributes.
- #persisted=(val) ⇒ Object
- #persisted? ⇒ Boolean
Methods included from SuperSettings::Storage
#==, #create_history, #history, included, #save!
Constructor Details
#initialize(attributes = nil) ⇒ StorageAttributes
Returns a new instance of StorageAttributes.
11 12 13 14 15 16 17 18 19 20 21 |
# File 'lib/super_settings/storage/storage_attributes.rb', line 11 def initialize(attributes = nil) @key = nil @raw_value = nil @description = nil @value_type = nil @deleted = false @updated_at = nil @created_at = nil @persisted = false super end |
Instance Attribute Details
#created_at ⇒ Object
Returns the value of attribute created_at.
9 10 11 |
# File 'lib/super_settings/storage/storage_attributes.rb', line 9 def created_at @created_at end |
#description ⇒ Object
Returns the value of attribute description.
9 10 11 |
# File 'lib/super_settings/storage/storage_attributes.rb', line 9 def description @description end |
#key ⇒ Object
Returns the value of attribute key.
9 10 11 |
# File 'lib/super_settings/storage/storage_attributes.rb', line 9 def key @key end |
#raw_value ⇒ Object
Returns the value of attribute raw_value.
9 10 11 |
# File 'lib/super_settings/storage/storage_attributes.rb', line 9 def raw_value @raw_value end |
#updated_at ⇒ Object
Returns the value of attribute updated_at.
9 10 11 |
# File 'lib/super_settings/storage/storage_attributes.rb', line 9 def updated_at @updated_at end |
#value_type ⇒ Object
Returns the value of attribute value_type.
9 10 11 |
# File 'lib/super_settings/storage/storage_attributes.rb', line 9 def value_type @value_type end |
Instance Method Details
#deleted=(val) ⇒ Object
51 52 53 |
# File 'lib/super_settings/storage/storage_attributes.rb', line 51 def deleted=(val) @deleted = !!val end |
#deleted? ⇒ Boolean
47 48 49 |
# File 'lib/super_settings/storage/storage_attributes.rb', line 47 def deleted? !!@deleted end |
#persisted=(val) ⇒ Object
59 60 61 |
# File 'lib/super_settings/storage/storage_attributes.rb', line 59 def persisted=(val) @persisted = !!val end |
#persisted? ⇒ Boolean
55 56 57 |
# File 'lib/super_settings/storage/storage_attributes.rb', line 55 def persisted? !!@persisted end |