Module: Kraps::Drivers::Driver

Included in:
FakeDriver, S3Driver
Defined in:
lib/kraps/drivers.rb

Instance Method Summary collapse

Instance Method Details

#download(name, path) ⇒ Object



20
21
22
# File 'lib/kraps/drivers.rb', line 20

def download(name, path)
  driver.download(name, bucket, path)
end

#exists?(name) ⇒ Boolean

Returns:

  • (Boolean)


24
25
26
# File 'lib/kraps/drivers.rb', line 24

def exists?(name)
  driver.exists?(name, bucket)
end

#list(prefix: nil) ⇒ Object



12
13
14
# File 'lib/kraps/drivers.rb', line 12

def list(prefix: nil)
  driver.list(bucket, prefix: prefix)
end

#store(name, data_or_io, options = {}) ⇒ Object



28
29
30
# File 'lib/kraps/drivers.rb', line 28

def store(name, data_or_io, options = {})
  driver.store(name, data_or_io, bucket, options)
end

#value(name) ⇒ Object



16
17
18
# File 'lib/kraps/drivers.rb', line 16

def value(name)
  driver.value(name, bucket)
end

#with_prefix(path) ⇒ Object



8
9
10
# File 'lib/kraps/drivers.rb', line 8

def with_prefix(path)
  File.join(*[@prefix, path].compact)
end