Class: DUI::Matcher
- Inherits:
-
Object
- Object
- DUI::Matcher
- Defined in:
- lib/DUI/matcher.rb
Instance Method Summary collapse
- #get_results(current_data, new_data) ⇒ Object
-
#initialize(&compare_method) ⇒ Matcher
constructor
A new instance of Matcher.
Constructor Details
#initialize(&compare_method) ⇒ Matcher
Returns a new instance of Matcher.
5 6 7 |
# File 'lib/DUI/matcher.rb', line 5 def initialize(&compare_method) @compare_method = compare_method || Proc.new { |c, n| c.id == n.id } end |
Instance Method Details
#get_results(current_data, new_data) ⇒ Object
9 10 11 12 13 |
# File 'lib/DUI/matcher.rb', line 9 def get_results(current_data, new_data) results = get_the_results_of_the_delete_and_update_process(current_data, new_data) results.records_to_insert = get_records_to_insert(results, new_data) results end |