Class: Xcodeproj::Workspace

Inherits:
Object
  • Object
show all
Defined in:
lib/cocoapods-jsource/command/xcodeproj_extern.rb

Overview

Provides support for generating, reading and serializing Xcode Workspace documents.

Instance Method Summary collapse

Instance Method Details

#>>(path_or_reference) ⇒ void

This method returns an undefined value.

removes a new path to the list of the of projects contained in the workspace.

Parameters:

  • path_or_reference (String, Xcodeproj::Workspace::FileReference)

    A string or Xcode::Workspace::FileReference containing a path to an Xcode project

Raises:

  • (ArgumentError)

    Raised if the input is neither a String nor a FileReference



19
20
21
22
23
24
25
26
27
28
29
30
# File 'lib/cocoapods-jsource/command/xcodeproj_extern.rb', line 19

def >>(path_or_reference)
  return unless @document && @document.respond_to?(:root)
  debug_element = nil
  @document.elements.each("*/FileRef") do |element|
    location = element.attributes["location"]
    if location == "group:#{path_or_reference}"
      debug_element = element
    end
  end
  @document.root.delete_element(debug_element)
  load_schemes_from_project File.expand_path(path_or_reference)
end