Class: SuperSettings::Storage::HistoryAttributes

Inherits:
Object
  • Object
show all
Includes:
Attributes
Defined in:
lib/super_settings/storage/history_attributes.rb

Overview

Generic class that can be extended to represent a history record for a setting in memory.

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Attributes

#attributes=

Constructor Details

#initializeHistoryAttributes

Returns a new instance of HistoryAttributes.



13
14
15
16
17
18
19
20
# File 'lib/super_settings/storage/history_attributes.rb', line 13

def initialize(*)
  @key = nil
  @value = nil
  @changed_by = nil
  @created_at = nil
  @deleted = false
  super
end

Instance Attribute Details

#changed_byObject

Returns the value of attribute changed_by.



9
10
11
# File 'lib/super_settings/storage/history_attributes.rb', line 9

def changed_by
  @changed_by
end

#created_atObject

Returns the value of attribute created_at.



11
12
13
# File 'lib/super_settings/storage/history_attributes.rb', line 11

def created_at
  @created_at
end

#deleted=(value) ⇒ Object (writeonly)

Sets the attribute deleted

Parameters:

  • value

    the value to set the attribute deleted to.



10
11
12
# File 'lib/super_settings/storage/history_attributes.rb', line 10

def deleted=(value)
  @deleted = value
end

#keyObject

Returns the value of attribute key.



9
10
11
# File 'lib/super_settings/storage/history_attributes.rb', line 9

def key
  @key
end

#valueObject

Returns the value of attribute value.



9
10
11
# File 'lib/super_settings/storage/history_attributes.rb', line 9

def value
  @value
end

Instance Method Details

#deleted?Boolean

Returns:

  • (Boolean)


26
27
28
# File 'lib/super_settings/storage/history_attributes.rb', line 26

def deleted?
  !!@deleted
end