class Xcodeproj::Project::Object::GroupableHelper

def full_path(object)

Returns:
  • (Pathname) - The path of the object without resolving the

Parameters:
  • object (PBXGroup, PBXFileReference) --
def full_path(object)
  folder =  case object.source_tree
            when '<group>'
              object_parent = parent(object)
              if object_parent.isa == 'PBXProject'.freeze
                nil
              else
                full_path(object_parent)
              end
            when 'SOURCE_ROOT'
              nil
            when '<absolute>'
              Pathname.new('/'.freeze)
            else
              Pathname.new("${#{object.source_tree}}")
            end
  folder ||= Pathname.new('')
  if object.path
    folder + object.path
  else
    folder
  end
end