Method: Xcodeproj::Project::Object::GroupableHelper.parents

Defined in:
lib/xcodeproj/project/object/helpers/groupable_helper.rb

.parents(object) ⇒ Array<PBXGroup, PBXProject>

Returns The parents of the object.

Parameters:

Returns:



35
36
37
38
39
40
41
42
# File 'lib/xcodeproj/project/object/helpers/groupable_helper.rb', line 35

def parents(object)
  if main_group?(object)
    []
  else
    parent = parent(object)
    parents(parent).push(parent)
  end
end