Class: Nochmal::Reupload
- Inherits:
-
Object
- Object
- Nochmal::Reupload
- Defined in:
- lib/nochmal/reupload.rb
Overview
Handles Reuploading of all attachments from: (required) = ActiveStorage service name (e.g. local) to: (optional) = ActiveStorage service name (e.g. aws) if left empty,
the currently configured service will be used.
Instance Attribute Summary collapse
-
#active_storage ⇒ Object
readonly
Returns the value of attribute active_storage.
-
#from_service ⇒ Object
readonly
Returns the value of attribute from_service.
-
#to_service ⇒ Object
readonly
Returns the value of attribute to_service.
Instance Method Summary collapse
- #all ⇒ Object
- #count ⇒ Object
-
#initialize(from: nil, to: nil, helper: nil) ⇒ Reupload
constructor
A new instance of Reupload.
- #list ⇒ Object
Constructor Details
#initialize(from: nil, to: nil, helper: nil) ⇒ Reupload
Returns a new instance of Reupload.
11 12 13 14 |
# File 'lib/nochmal/reupload.rb', line 11 def initialize(from: nil, to: nil, helper: nil) @active_storage = helper || Adapters::ActiveStorage.new(from: from, to: to) @notes = [] end |
Instance Attribute Details
#active_storage ⇒ Object (readonly)
Returns the value of attribute active_storage.
9 10 11 |
# File 'lib/nochmal/reupload.rb', line 9 def active_storage @active_storage end |
#from_service ⇒ Object (readonly)
Returns the value of attribute from_service.
9 10 11 |
# File 'lib/nochmal/reupload.rb', line 9 def from_service @from_service end |
#to_service ⇒ Object (readonly)
Returns the value of attribute to_service.
9 10 11 |
# File 'lib/nochmal/reupload.rb', line 9 def to_service @to_service end |
Instance Method Details
#all ⇒ Object
16 17 18 |
# File 'lib/nochmal/reupload.rb', line 16 def all handle_each_model(:reupload) end |
#count ⇒ Object
24 25 26 |
# File 'lib/nochmal/reupload.rb', line 24 def count handle_each_model(:count) end |
#list ⇒ Object
20 21 22 |
# File 'lib/nochmal/reupload.rb', line 20 def list handle_each_model(:list) end |