Class: XcodeProject::PBXFileReference

Inherits:
FileNode show all
Defined in:
lib/xcodeproject/pbx_file_reference.rb

Instance Attribute Summary

Attributes inherited from FileNode

#name, #path, #source_tree

Attributes inherited from Node

#isa, #uuid

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from FileNode

#group_path, #parent, #total_path

Constructor Details

#initialize(root, uuid, data) ⇒ PBXFileReference

Returns a new instance of PBXFileReference.



30
31
32
# File 'lib/xcodeproject/pbx_file_reference.rb', line 30

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

Class Method Details

.add(root, path) ⇒ Object



43
44
45
46
# File 'lib/xcodeproject/pbx_file_reference.rb', line 43

def self.add(root, path)
	uuid, data = root.add_object(self.create_object_hash(path)) 
	self.new(root, uuid, data)
end

Instance Method Details

#remove!Object



34
35
36
37
38
39
40
41
# File 'lib/xcodeproject/pbx_file_reference.rb', line 34

def remove!
	root.build_files(uuid).each do |build_file_obj|
		build_file_obj.remove!
	end
	
	parent.remove_child_uuid(uuid)
	root.remove_object(uuid)
end