Class: ActiveStorage::Attached::Changes::PurgeMany
- Inherits:
-
Object
- Object
- ActiveStorage::Attached::Changes::PurgeMany
- Defined in:
- lib/active_storage/attached/changes/purge_many.rb
Overview
:nodoc:
Instance Attribute Summary collapse
-
#attachments ⇒ Object
readonly
Returns the value of attribute attachments.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#record ⇒ Object
readonly
Returns the value of attribute record.
Instance Method Summary collapse
-
#initialize(name, record, attachments) ⇒ PurgeMany
constructor
A new instance of PurgeMany.
- #purge ⇒ Object
- #purge_later ⇒ Object
Constructor Details
#initialize(name, record, attachments) ⇒ PurgeMany
Returns a new instance of PurgeMany.
7 8 9 |
# File 'lib/active_storage/attached/changes/purge_many.rb', line 7 def initialize(name, record, ) @name, @record, @attachments = name, record, end |
Instance Attribute Details
#attachments ⇒ Object (readonly)
Returns the value of attribute attachments.
5 6 7 |
# File 'lib/active_storage/attached/changes/purge_many.rb', line 5 def @attachments end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
5 6 7 |
# File 'lib/active_storage/attached/changes/purge_many.rb', line 5 def name @name end |
#record ⇒ Object (readonly)
Returns the value of attribute record.
5 6 7 |
# File 'lib/active_storage/attached/changes/purge_many.rb', line 5 def record @record end |
Instance Method Details
#purge ⇒ Object
11 12 13 14 |
# File 'lib/active_storage/attached/changes/purge_many.rb', line 11 def purge .each(&:purge) reset end |
#purge_later ⇒ Object
16 17 18 19 |
# File 'lib/active_storage/attached/changes/purge_many.rb', line 16 def purge_later .each(&:purge_later) reset end |