Module: Shrine::Plugins::Instrumentation::FileMethods
- Defined in:
- lib/shrine/plugins/instrumentation.rb
Instance Method Summary collapse
-
#delete ⇒ Object
Sends a ‘delete.shrine` event.
-
#exists? ⇒ Boolean
Sends a ‘exists.shrine` event.
-
#open(**options) ⇒ Object
Sends a ‘download.shrine` event.
Instance Method Details
#delete ⇒ Object
Sends a ‘delete.shrine` event.
124 125 126 127 128 129 130 |
# File 'lib/shrine/plugins/instrumentation.rb', line 124 def delete shrine_class.instrument( :delete, storage: storage_key.to_sym, location: id, ) { super } end |
#exists? ⇒ Boolean
Sends a ‘exists.shrine` event.
115 116 117 118 119 120 121 |
# File 'lib/shrine/plugins/instrumentation.rb', line 115 def exists? shrine_class.instrument( :exists, storage: storage_key.to_sym, location: id, ) { super } end |
#open(**options) ⇒ Object
Sends a ‘download.shrine` event.
105 106 107 108 109 110 111 112 |
# File 'lib/shrine/plugins/instrumentation.rb', line 105 def open(**) shrine_class.instrument( :download, storage: storage_key.to_sym, location: id, download_options: , ) { super } end |