Class: Journaled::AuditLog::Config
- Inherits:
-
Struct
- Object
- Struct
- Journaled::AuditLog::Config
- Defined in:
- lib/journaled/audit_log.rb
Instance Attribute Summary collapse
-
#enabled ⇒ Object
writeonly
Sets the attribute enabled.
-
#enqueue_opts ⇒ Object
Returns the value of attribute enqueue_opts.
-
#ignored_columns ⇒ Object
Returns the value of attribute ignored_columns.
Class Method Summary collapse
Instance Method Summary collapse
- #dup ⇒ Object
- #enabled? ⇒ Boolean
-
#initialize ⇒ Config
constructor
A new instance of Config.
Constructor Details
#initialize ⇒ Config
Returns a new instance of Config.
74 75 76 77 78 |
# File 'lib/journaled/audit_log.rb', line 74 def initialize(*) super self.ignored_columns ||= [] self.enqueue_opts ||= {} end |
Instance Attribute Details
#enabled=(value) ⇒ Object
Sets the attribute enabled
69 70 71 |
# File 'lib/journaled/audit_log.rb', line 69 def enabled=(value) @enabled = value end |
#enqueue_opts ⇒ Object
Returns the value of attribute enqueue_opts
69 70 71 |
# File 'lib/journaled/audit_log.rb', line 69 def enqueue_opts @enqueue_opts end |
#ignored_columns ⇒ Object
Returns the value of attribute ignored_columns
69 70 71 |
# File 'lib/journaled/audit_log.rb', line 69 def ignored_columns @ignored_columns end |
Class Method Details
Instance Method Details
#dup ⇒ Object
84 85 86 87 88 89 |
# File 'lib/journaled/audit_log.rb', line 84 def dup super.tap do |config| config.ignored_columns = ignored_columns.dup config.enqueue_opts = enqueue_opts.dup end end |
#enabled? ⇒ Boolean
80 81 82 |
# File 'lib/journaled/audit_log.rb', line 80 def enabled? !AuditLog._disabled && self[:enabled].present? end |