Method: Xcode::Workspace#project
- Defined in:
- lib/xcode/workspace.rb
#project(name) {|project| ... } ⇒ Project
Note:
if two projects match names, the first matching scheme is returned.
Return the names project. Raises an error if no projects match the specified name.
63 64 65 66 67 68 |
# File 'lib/xcode/workspace.rb', line 63 def project(name) project = @projects.select {|c| c.name == name.to_s}.first raise "No such project #{name} in #{self}, available projects are #{@projects.map {|c| c.name}.join(', ')}" if project.nil? yield project if block_given? project end |