Module: Shrine::Plugins::Hooks::InstanceMethods
- Defined in:
- lib/shrine/plugins/hooks.rb
Instance Method Summary collapse
- #after_delete ⇒ Object
- #after_process ⇒ Object
- #after_store ⇒ Object
- #after_upload ⇒ Object
- #around_delete(*args) ⇒ Object
- #around_process(*args) ⇒ Object
- #around_store(*args) ⇒ Object
- #around_upload(*args) ⇒ Object
- #before_delete ⇒ Object
- #before_process ⇒ Object
- #before_store ⇒ Object
- #before_upload ⇒ Object
- #delete(io, context = {}) ⇒ Object
- #store(io, context = {}) ⇒ Object
- #upload(io, context = {}) ⇒ Object
Instance Method Details
#after_delete ⇒ Object
83 84 |
# File 'lib/shrine/plugins/hooks.rb', line 83 def after_delete(*) end |
#after_process ⇒ Object
45 46 |
# File 'lib/shrine/plugins/hooks.rb', line 45 def after_process(*) end |
#after_store ⇒ Object
64 65 |
# File 'lib/shrine/plugins/hooks.rb', line 64 def after_store(*) end |
#after_upload ⇒ Object
25 26 |
# File 'lib/shrine/plugins/hooks.rb', line 25 def after_upload(*) end |
#around_delete(*args) ⇒ Object
76 77 78 |
# File 'lib/shrine/plugins/hooks.rb', line 76 def around_delete(*args) yield end |
#around_process(*args) ⇒ Object
38 39 40 |
# File 'lib/shrine/plugins/hooks.rb', line 38 def around_process(*args) yield end |
#around_store(*args) ⇒ Object
57 58 59 |
# File 'lib/shrine/plugins/hooks.rb', line 57 def around_store(*args) yield end |
#around_upload(*args) ⇒ Object
18 19 20 |
# File 'lib/shrine/plugins/hooks.rb', line 18 def around_upload(*args) yield end |
#before_delete ⇒ Object
80 81 |
# File 'lib/shrine/plugins/hooks.rb', line 80 def before_delete(*) end |
#before_process ⇒ Object
42 43 |
# File 'lib/shrine/plugins/hooks.rb', line 42 def before_process(*) end |
#before_store ⇒ Object
61 62 |
# File 'lib/shrine/plugins/hooks.rb', line 61 def before_store(*) end |
#before_upload ⇒ Object
22 23 |
# File 'lib/shrine/plugins/hooks.rb', line 22 def before_upload(*) end |
#delete(io, context = {}) ⇒ Object
68 69 70 71 72 73 74 |
# File 'lib/shrine/plugins/hooks.rb', line 68 def delete(io, context = {}) result = nil before_delete(io, context) around_delete(io, context) { result = super } after_delete(io, context) result end |
#store(io, context = {}) ⇒ Object
49 50 51 52 53 54 55 |
# File 'lib/shrine/plugins/hooks.rb', line 49 def store(io, context = {}) result = nil before_store(io, context) around_store(io, context) { result = super } after_store(io, context) result end |
#upload(io, context = {}) ⇒ Object
10 11 12 13 14 15 16 |
# File 'lib/shrine/plugins/hooks.rb', line 10 def upload(io, context = {}) result = nil before_upload(io, context) around_upload(io, context) { result = super } after_upload(io, context) result end |