Class: Marsdawn::Storage::Base

Inherits:
Object
  • Object
show all
Defined in:
lib/marsdawn/storage/base.rb

Instance Method Summary collapse

Constructor Details

#initialize(config, opts) ⇒ Base

Returns a new instance of Base.



5
6
7
8
# File 'lib/marsdawn/storage/base.rb', line 5

def initialize config, opts
  @config = config
  @opts = opts
end

Instance Method Details

#clean_upObject



25
26
# File 'lib/marsdawn/storage/base.rb', line 25

def clean_up
end

#finalizeObject



22
23
# File 'lib/marsdawn/storage/base.rb', line 22

def finalize
end

#get(uri) ⇒ Object

Raises:

  • (NotImplementedError)


40
41
42
# File 'lib/marsdawn/storage/base.rb', line 40

def get uri
  raise NotImplementedError.new("#{self.class.name}#get() is not implemented.")
end

#get_document_infoObject

Raises:

  • (NotImplementedError)


36
37
38
# File 'lib/marsdawn/storage/base.rb', line 36

def get_document_info
  raise NotImplementedError.new("#{self.class.name}#get_document_info() is not implemented.")
end

#keyObject



10
11
12
# File 'lib/marsdawn/storage/base.rb', line 10

def key
  @opts[:key]
end

#langObject



14
15
16
# File 'lib/marsdawn/storage/base.rb', line 14

def lang
  @opts[:lang]
end

#set(uri, content, exvars, sysinfo) ⇒ Object

Raises:

  • (NotImplementedError)


32
33
34
# File 'lib/marsdawn/storage/base.rb', line 32

def set uri, content, exvars, sysinfo
  raise NotImplementedError.new("#{self.class.name}#set() is not implemented.")
end

#set_document_info(doc_info) ⇒ Object

Raises:

  • (NotImplementedError)


28
29
30
# File 'lib/marsdawn/storage/base.rb', line 28

def set_document_info doc_info
  raise NotImplementedError.new("#{self.class.name}#set_document_info() is not implemented.")
end

#versionObject



18
19
20
# File 'lib/marsdawn/storage/base.rb', line 18

def version
  @opts[:version]
end