Method: Xcodeproj::Project::Object::AbstractObject#ensure_internal_consistency

Defined in:
lib/synx/abstract_object.rb

#ensure_internal_consistency(group) ⇒ Object



21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
# File 'lib/synx/abstract_object.rb', line 21

def ensure_internal_consistency(group)
  @removed_from_groups = []
  if referring_groups.count > 1
    # Files should only have one referring group -- this is an internal consistency issue if there is more than 1.
    # Just remove all referring groups but the one we're syncing with

    referring_groups.each do |rg|
      unless rg == group
        rg.remove_reference(self) unless rg == group
        @removed_from_groups << rg.hierarchy_path
      end
    end

  end
end