Class: XcodeProject::PBXProject

Inherits:
Node
  • Object
show all
Defined in:
lib/xcodeproject/pbx_project.rb

Instance Attribute Summary collapse

Attributes inherited from Node

#isa, #uuid

Instance Method Summary collapse

Constructor Details

#initialize(root, uuid, data) ⇒ PBXProject

Returns a new instance of PBXProject.



13
14
15
16
17
18
19
20
21
22
23
# File 'lib/xcodeproject/pbx_project.rb', line 13

def initialize (root, uuid, data)
	super(root, uuid, data)

	@main_group = root.object!(data['mainGroup'])
	@product_ref_group = root.object!(data['productRefGroup'])
	@project_dir_path = data['projectDirPath']
	@compatibility_version = data['compatibilityVersion']
	@development_region = data['developmentRegion']
	@know_regions = data['knownRegions']
	@attributes = data['attributes']
end

Instance Attribute Details

#attributesObject (readonly)

Returns the value of attribute attributes.



11
12
13
# File 'lib/xcodeproject/pbx_project.rb', line 11

def attributes
  @attributes
end

#compatibility_versionObject (readonly)

Returns the value of attribute compatibility_version.



8
9
10
# File 'lib/xcodeproject/pbx_project.rb', line 8

def compatibility_version
  @compatibility_version
end

#development_regionObject (readonly)

Returns the value of attribute development_region.



9
10
11
# File 'lib/xcodeproject/pbx_project.rb', line 9

def development_region
  @development_region
end

#know_regionsObject (readonly)

Returns the value of attribute know_regions.



10
11
12
# File 'lib/xcodeproject/pbx_project.rb', line 10

def know_regions
  @know_regions
end

#main_groupObject (readonly)

Returns the value of attribute main_group.



5
6
7
# File 'lib/xcodeproject/pbx_project.rb', line 5

def main_group
  @main_group
end

#product_ref_groupObject (readonly)

Returns the value of attribute product_ref_group.



6
7
8
# File 'lib/xcodeproject/pbx_project.rb', line 6

def product_ref_group
  @product_ref_group
end

#project_dir_pathObject (readonly)

Returns the value of attribute project_dir_path.



7
8
9
# File 'lib/xcodeproject/pbx_project.rb', line 7

def project_dir_path
  @project_dir_path
end

Instance Method Details

#target(name) ⇒ Object



29
30
31
# File 'lib/xcodeproject/pbx_project.rb', line 29

def target (name)
	root.find_object('PBXNativeTarget', {'name' => name})
end

#targetsObject



25
26
27
# File 'lib/xcodeproject/pbx_project.rb', line 25

def targets
	data['targets'].map {|uuid| root.object!(uuid)}
end