Class: ActiveStorageDedup::Configuration
- Inherits:
-
Object
- Object
- ActiveStorageDedup::Configuration
- Defined in:
- lib/active_storage_dedup/configuration.rb
Instance Attribute Summary collapse
-
#auto_purge_orphans ⇒ Object
Automatically purge orphaned blobs when reference_count reaches 0 (default: true) Only applies when enabled = true.
-
#deduplicate_by_default ⇒ Object
Default deduplication setting for attachments when gem is enabled (default: true) This can be overridden per-attachment using the deduplicate: option Only applies when enabled = true.
-
#enabled ⇒ Object
Master switch to enable/disable the entire gem (default: true) If false, no deduplication or lifecycle management will occur at all.
Instance Method Summary collapse
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
Constructor Details
#initialize ⇒ Configuration
18 19 20 21 22 23 |
# File 'lib/active_storage_dedup/configuration.rb', line 18 def initialize @enabled = true @deduplicate_by_default = true @auto_purge_orphans = true Rails.logger.debug "[ActiveStorageDedup] Configuration initialized with defaults: enabled=#{@enabled}, deduplicate_by_default=#{@deduplicate_by_default}, auto_purge_orphans=#{@auto_purge_orphans}" if defined?(Rails) end |
Instance Attribute Details
#auto_purge_orphans ⇒ Object
Automatically purge orphaned blobs when reference_count reaches 0 (default: true) Only applies when enabled = true
16 17 18 |
# File 'lib/active_storage_dedup/configuration.rb', line 16 def auto_purge_orphans @auto_purge_orphans end |
#deduplicate_by_default ⇒ Object
Default deduplication setting for attachments when gem is enabled (default: true) This can be overridden per-attachment using the deduplicate: option Only applies when enabled = true
12 13 14 |
# File 'lib/active_storage_dedup/configuration.rb', line 12 def deduplicate_by_default @deduplicate_by_default end |
#enabled ⇒ Object
Master switch to enable/disable the entire gem (default: true) If false, no deduplication or lifecycle management will occur at all
7 8 9 |
# File 'lib/active_storage_dedup/configuration.rb', line 7 def enabled @enabled end |