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.
85 86 87 88 89 |
# File 'lib/journaled/audit_log.rb', line 85 def initialize(*) super self.ignored_columns ||= [] self.enqueue_opts ||= {} end |
Instance Attribute Details
#enabled=(value) ⇒ Object
Sets the attribute enabled
80 81 82 |
# File 'lib/journaled/audit_log.rb', line 80 def enabled=(value) @enabled = value end |
#enqueue_opts ⇒ Object
Returns the value of attribute enqueue_opts
80 81 82 |
# File 'lib/journaled/audit_log.rb', line 80 def enqueue_opts @enqueue_opts end |
#ignored_columns ⇒ Object
Returns the value of attribute ignored_columns
80 81 82 |
# File 'lib/journaled/audit_log.rb', line 80 def ignored_columns @ignored_columns end |
Class Method Details
Instance Method Details
#dup ⇒ Object
95 96 97 98 99 100 |
# File 'lib/journaled/audit_log.rb', line 95 def dup super.tap do |config| config.ignored_columns = ignored_columns.dup # rubocop:disable Rails/IgnoredColumnsAssignment config.enqueue_opts = enqueue_opts.dup end end |
#enabled? ⇒ Boolean
91 92 93 |
# File 'lib/journaled/audit_log.rb', line 91 def enabled? !AuditLog._disabled && self[:enabled].present? end |