Class: Notebook::StorageAdapters::Base

Inherits:
Object
  • Object
show all
Defined in:
lib/notebook/storage_adapters/base.rb

Direct Known Subclasses

Filesystem

Instance Method Summary collapse

Constructor Details

#initialize(attachment, _options = {}) ⇒ Base

Returns a new instance of Base.



4
5
6
# File 'lib/notebook/storage_adapters/base.rb', line 4

def initialize(attachment, _options = {})
  @attachment = attachment
end

Instance Method Details

#deleteObject



8
9
10
11
12
13
# File 'lib/notebook/storage_adapters/base.rb', line 8

def delete
  fail(
    NotImplementedError,
    'Compliant Notebook storage adapters should define the `delete` method'
  )
end

#getObject



15
16
17
18
19
20
# File 'lib/notebook/storage_adapters/base.rb', line 15

def get
  fail(
    NotImplementedError,
    'Compliant Notebook storage adapters should define the `get` method'
  )
end

#uploadObject



22
23
24
25
26
27
# File 'lib/notebook/storage_adapters/base.rb', line 22

def upload
  fail(
    NotImplementedError,
    'Compliant Notebook storage adapters should define the `upload` method'
  )
end