Module: AttributesHistory

Defined in:
lib/attributes_history.rb,
lib/attributes_history/gem_version.rb,
lib/attributes_history/history_saver.rb,
lib/attributes_history/history_retriever.rb,
lib/attributes_history/has_attributes_history.rb

Defined Under Namespace

Modules: HasAttributesHistory Classes: HistoryRetriever, HistorySaver

Constant Summary collapse

VERSION =
'0.2.0'

Class Attribute Summary collapse

Class Method Summary collapse

Class Attribute Details

.enabled=(value) ⇒ Object (writeonly)

Sets the attribute enabled

Parameters:

  • value

    the value to set the attribute enabled to.



8
9
10
# File 'lib/attributes_history.rb', line 8

def enabled=(value)
  @enabled = value
end

Class Method Details

.enabled?Boolean

Returns:

  • (Boolean)


10
11
12
13
# File 'lib/attributes_history.rb', line 10

def enabled?
  # Enabled by default
  @enabled.nil? ? true : @enabled
end