Class: ActiveRecordDataLoader::Loader
- Inherits:
-
Object
- Object
- ActiveRecordDataLoader::Loader
- Defined in:
- lib/active_record_data_loader/loader.rb
Instance Method Summary collapse
-
#initialize(configuration, definition) ⇒ Loader
constructor
A new instance of Loader.
- #load_data ⇒ Object
Constructor Details
#initialize(configuration, definition) ⇒ Loader
Returns a new instance of Loader.
5 6 7 8 |
# File 'lib/active_record_data_loader/loader.rb', line 5 def initialize(configuration, definition) @configuration = configuration @definition = definition end |
Instance Method Details
#load_data ⇒ Object
10 11 12 13 14 15 16 |
# File 'lib/active_record_data_loader/loader.rb', line 10 def load_data ActiveRecordDataLoader::ActiveRecord::PerRowValueCache.clear file_adapter_class.() do |file_adapter| definition.models.map { |m| load_model(m, file_adapter) } end end |