Class: SimpleMaster::Loader::MarshalLoader

Inherits:
SimpleMaster::Loader show all
Defined in:
lib/simple_master/loader/marshal_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



10
11
12
# File 'lib/simple_master/loader/marshal_loader.rb', line 10

def build_records(_klass, raw)
  Marshal.load(raw) # rubocop:disable Security/MarshalLoad
end

#read_raw(table) ⇒ Object



6
7
8
# File 'lib/simple_master/loader/marshal_loader.rb', line 6

def read_raw(table)
  File.read("#{@options[:path]}/#{table.klass.table_name}.marshal")
end