Class: Kraps::Drivers::FakeDriver

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(bucket:, prefix: nil) ⇒ FakeDriver

Returns a new instance of FakeDriver.



50
51
52
53
54
# File 'lib/kraps/drivers.rb', line 50

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

Instance Attribute Details

#bucketObject (readonly)

Returns the value of attribute bucket.



48
49
50
# File 'lib/kraps/drivers.rb', line 48

def bucket
  @bucket
end

#driverObject (readonly)

Returns the value of attribute driver.



48
49
50
# File 'lib/kraps/drivers.rb', line 48

def driver
  @driver
end

#prefixObject (readonly)

Returns the value of attribute prefix.



48
49
50
# File 'lib/kraps/drivers.rb', line 48

def prefix
  @prefix
end

Instance Method Details

#flushObject



56
57
58
# File 'lib/kraps/drivers.rb', line 56

def flush
  driver.flush
end