Class: Xcodeproj::Project

Inherits:
Object
  • Object
show all
Defined in:
lib/kintsugi/xcodeproj_extensions.rb

Defined Under Namespace

Modules: Object Classes: ObjectDictionary

Instance Method Summary collapse

Instance Method Details

#group_or_file_at_path(path) ⇒ PBXGroup/PBXVariantGroup/PBXFileReference

Returns the group found at ‘path`. If `path` is empty returns the main group. Returns `nil` if the group at path was not found.

Parameters:

  • Path (String)

    to the group.

Returns:

  • (PBXGroup/PBXVariantGroup/PBXFileReference)


15
16
17
# File 'lib/kintsugi/xcodeproj_extensions.rb', line 15

def group_or_file_at_path(path)
  path.empty? ? self.main_group : self[path]
end