Class: Cranium::ImportStrategy::Merge

Inherits:
Base
  • Object
show all
Defined in:
lib/cranium/import_strategy/merge.rb

Instance Attribute Summary

Attributes inherited from Base

#import_definition

Instance Method Summary collapse

Methods inherited from Base

#import, #initialize

Constructor Details

This class inherits a constructor from Cranium::ImportStrategy::Base

Instance Method Details

#import_from(source_table) ⇒ Object



3
4
5
6
7
8
9
# File 'lib/cranium/import_strategy/merge.rb', line 3

def import_from(source_table)
  @source_table = source_table

  update_existing_records
  import_new_records
  database[@source_table].count
end