Class: SidekiqProfilingMiddleware::S3::Object

Inherits:
StringIO
  • Object
show all
Defined in:
lib/sidekiq_profiling_middleware/s3.rb

Instance Method Summary collapse

Constructor Details

#initialize(bucket:, key:) ⇒ Object

Returns a new instance of Object.



8
9
10
11
12
13
# File 'lib/sidekiq_profiling_middleware/s3.rb', line 8

def initialize(bucket:, key:)
  @bucket = bucket
  @key = key

  super()
end

Instance Method Details

#uploadObject



15
16
17
18
19
# File 'lib/sidekiq_profiling_middleware/s3.rb', line 15

def upload
  rewind

  S3.client.put_object(bucket: bucket, key: key, body: self)
end