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.



28
29
30
# File 'lib/xcodeproject/pbx_file_reference.rb', line 28

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

Class Method Details

.add(root, path) ⇒ Object



41
42
43
44
# File 'lib/xcodeproject/pbx_file_reference.rb', line 41

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



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

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