module Shrine::Plugins::Instrumentation::FileMethods

  1. lib/shrine/plugins/instrumentation.rb

Methods

Public Instance

  1. delete
  2. exists?
  3. stream

Public Instance methods

delete()

Sends a delete.shrine event.

[show source]
    # File lib/shrine/plugins/instrumentation.rb
119 def delete
120   shrine_class.instrument(:delete, {
121     storage: storage_key,
122     location: id,
123   }) { super }
124 end
exists?()

Sends a exists.shrine event.

[show source]
    # File lib/shrine/plugins/instrumentation.rb
111 def exists?
112   shrine_class.instrument(:exists, {
113     storage: storage_key,
114     location: id,
115   }) { super }
116 end
stream(destination, **options)

Sends a download.shrine event.

[show source]
    # File lib/shrine/plugins/instrumentation.rb
100 def stream(destination, **options)
101   return super if opened?
102 
103   shrine_class.instrument(:download, {
104     storage: storage_key,
105     location: id,
106     download_options: options,
107   }) { super(destination, **options, instrument: false) }
108 end