Class: ActiveShrine::Attached::Changes::DeleteMany
- Inherits:
-
Object
- Object
- ActiveShrine::Attached::Changes::DeleteMany
- Defined in:
- lib/active_shrine/attached/changes/delete_many.rb
Overview
:nodoc:
Instance Attribute Summary collapse
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#record ⇒ Object
readonly
Returns the value of attribute record.
Instance Method Summary collapse
- #attachables ⇒ Object
- #attachments ⇒ Object
-
#initialize(name, record) ⇒ DeleteMany
constructor
A new instance of DeleteMany.
- #save ⇒ Object
Constructor Details
#initialize(name, record) ⇒ DeleteMany
Returns a new instance of DeleteMany.
9 10 11 12 |
# File 'lib/active_shrine/attached/changes/delete_many.rb', line 9 def initialize(name, record) @name = name @record = record end |
Instance Attribute Details
#name ⇒ Object (readonly)
Returns the value of attribute name.
7 8 9 |
# File 'lib/active_shrine/attached/changes/delete_many.rb', line 7 def name @name end |
#record ⇒ Object (readonly)
Returns the value of attribute record.
7 8 9 |
# File 'lib/active_shrine/attached/changes/delete_many.rb', line 7 def record @record end |
Instance Method Details
#attachables ⇒ Object
14 15 16 |
# File 'lib/active_shrine/attached/changes/delete_many.rb', line 14 def attachables [] end |
#attachments ⇒ Object
18 19 20 |
# File 'lib/active_shrine/attached/changes/delete_many.rb', line 18 def ActiveShrine::Attachment.none end |
#save ⇒ Object
22 23 24 |
# File 'lib/active_shrine/attached/changes/delete_many.rb', line 22 def save record.public_send(:"#{name}_attachments=", []) end |