Class: Ripple::Conflict::BasicResolver
- Defined in:
- lib/ripple/conflict/basic_resolver.rb
Instance Method Summary collapse
-
#initialize(main_resolver) ⇒ BasicResolver
constructor
A new instance of BasicResolver.
- #perform ⇒ Object
- #remaining_conflicts ⇒ Object
- #unexpected_conflicts ⇒ Object
Constructor Details
#initialize(main_resolver) ⇒ BasicResolver
Returns a new instance of BasicResolver.
6 7 8 |
# File 'lib/ripple/conflict/basic_resolver.rb', line 6 def initialize(main_resolver) @main_resolver = main_resolver end |
Instance Method Details
#perform ⇒ Object
22 23 24 25 26 27 |
# File 'lib/ripple/conflict/basic_resolver.rb', line 22 def perform process_properties process_linked_associations process_stored_key_associations end |
#remaining_conflicts ⇒ Object
10 11 12 |
# File 'lib/ripple/conflict/basic_resolver.rb', line 10 def remaining_conflicts @remaining_conflicts ||= [] end |
#unexpected_conflicts ⇒ Object
14 15 16 17 18 19 20 |
# File 'lib/ripple/conflict/basic_resolver.rb', line 14 def unexpected_conflicts # if the user didn't specify the conflict they expect, # then don't consider any conflicts unexpected return [] if model_class.expected_conflicts.blank? remaining_conflicts - model_class.expected_conflicts end |