Class: SimpleMaster::Loader::DatasetLoader

Inherits:
SimpleMaster::Loader show all
Defined in:
lib/simple_master/loader/dataset_loader.rb

Instance Attribute Summary

Attributes inherited from SimpleMaster::Loader

#options

Instance Method Summary collapse

Methods inherited from SimpleMaster::Loader

#globalize, #initialize, #load_records

Constructor Details

This class inherits a constructor from SimpleMaster::Loader

Instance Method Details

#build_records(_klass, raw) ⇒ Object



11
12
13
# File 'lib/simple_master/loader/dataset_loader.rb', line 11

def build_records(_klass, raw)
  raw.all
end

#datasetObject



15
16
17
# File 'lib/simple_master/loader/dataset_loader.rb', line 15

def dataset
  @options[:dataset]
end

#read_raw(table) ⇒ Object

options: dataset: …



7
8
9
# File 'lib/simple_master/loader/dataset_loader.rb', line 7

def read_raw(table)
  dataset.table(table.klass)
end