Module: Shrine::Plugins::Instrumentation::FileMethods
- Defined in:
- lib/shrine/plugins/instrumentation.rb
Instance Method Summary collapse
-
#delete ⇒ Object
Sends a
delete.shrineevent. -
#exists? ⇒ Boolean
Sends a
exists.shrineevent. -
#stream(destination, **options) ⇒ Object
Sends a
download.shrineevent.
Instance Method Details
#delete ⇒ Object
Sends a delete.shrine event.
119 120 121 122 123 124 |
# File 'lib/shrine/plugins/instrumentation.rb', line 119 def delete shrine_class.instrument(:delete, { storage: storage_key, location: id, }) { super } end |
#exists? ⇒ Boolean
Sends a exists.shrine event.
111 112 113 114 115 116 |
# File 'lib/shrine/plugins/instrumentation.rb', line 111 def exists? shrine_class.instrument(:exists, { storage: storage_key, location: id, }) { super } end |
#stream(destination, **options) ⇒ Object
Sends a download.shrine event.
100 101 102 103 104 105 106 107 108 |
# File 'lib/shrine/plugins/instrumentation.rb', line 100 def stream(destination, **) return super if opened? shrine_class.instrument(:download, { storage: storage_key, location: id, download_options: , }) { super(destination, **, instrument: false) } end |