class Danger::DangerXcodeproj

This is your plugin class. Any attributes or methods you expose here will be available from within your Dangerfile.

To be published on the Danger plugins site, you will need to have the public interface documented. Danger uses [YARD](yardoc.org/) for generating documentation from your plugin source, and you can verify by running `danger plugins lint` or `bundle exec rake spec`.

You should replace these comments with a public description of your library.

@example Ensure people are well warned about merging on Mondays

my_plugin.warn_on_mondays

@see Manoj/danger-xcodeproj @tags monday, weekends, time, rattata

Attributes

project[RW]

Xcode project object @return [Project] Xcode project object

Public Instance Methods

open(path=nil) click to toggle source

Opens Xcode project file using the given path

@return [void]

# File lib/xcodeproj/plugin.rb, line 33
def open(path=nil)
  # Fails if Xcode project file path is not provided
  raise "Xcode project file path in not set!" unless !path.nil?

  @project = Xcodeproj::Project.open(path)
end
target_attributes() click to toggle source

Targets Attributes in Xcode Project file

@return [Array<TargetAttributes>]

# File lib/xcodeproj/plugin.rb, line 54
def target_attributes
  raise "Xcode project is not opened!" if project.nil?
  
  @project.root_object.attributes["TargetAttributes"]
end
targets() click to toggle source

Targets in Xcode Project file

@return [Array<Target>]

# File lib/xcodeproj/plugin.rb, line 44
def targets
  raise "Xcode project is not opened!" if @project.nil?

  @project.targets
end