Class: Kraps::Drivers::S3Driver

Inherits:
Object
  • Object
show all
Includes:
Driver
Defined in:
lib/kraps/drivers.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Driver

#download, #exists?, #list, #store, #value, #with_prefix

Constructor Details

#initialize(s3_client:, bucket:, prefix: nil) ⇒ S3Driver

Returns a new instance of S3Driver.



38
39
40
41
42
# File 'lib/kraps/drivers.rb', line 38

def initialize(s3_client:, bucket:, prefix: nil)
  @driver = Attachie::S3Driver.new(s3_client)
  @bucket = bucket
  @prefix = prefix
end

Instance Attribute Details

#bucketObject (readonly)

Returns the value of attribute bucket.



36
37
38
# File 'lib/kraps/drivers.rb', line 36

def bucket
  @bucket
end

#driverObject (readonly)

Returns the value of attribute driver.



36
37
38
# File 'lib/kraps/drivers.rb', line 36

def driver
  @driver
end

#prefixObject (readonly)

Returns the value of attribute prefix.



36
37
38
# File 'lib/kraps/drivers.rb', line 36

def prefix
  @prefix
end