Class: NoSE::Loader::LoaderBase

Inherits:
Object
  • Object
show all
Defined in:
lib/nose/loader.rb

Overview

Superclass for all data loaders

Direct Known Subclasses

CsvLoader, MysqlLoader, RandomLoader, SqlLoader

Instance Method Summary collapse

Constructor Details

#initialize(workload = nil, backend = nil) ⇒ LoaderBase

Returns a new instance of LoaderBase.



8
9
10
11
# File 'lib/nose/loader.rb', line 8

def initialize(workload = nil, backend = nil)
  @workload = workload
  @backend = backend
end

Instance Method Details

#load(_indexes, _config, _show_progress = false, _limit = nil, _skip_existing = true) ⇒ void

This method is abstract.

Subclasses should load data for the given list of indexes

This method returns an undefined value.

:nocov:



24
25
26
27
# File 'lib/nose/loader.rb', line 24

def load(_indexes, _config, _show_progress = false, _limit = nil,
         _skip_existing = true)
  fail NotImplementedError
end

#model(_config) ⇒ Object

This method is abstract.

Subclasses should generate a model from the external source

:nocov:



32
33
34
# File 'lib/nose/loader.rb', line 32

def model(_config)
  fail NotImplementedError
end

#workload(_config) ⇒ void

This method is abstract.

Subclasses should produce a workload

This method returns an undefined value.

:nocov:



16
17
18
# File 'lib/nose/loader.rb', line 16

def workload(_config)
  fail NotImplementedError
end