Class: XcodeProject::PBXBuildFile

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

Instance Attribute Summary collapse

Attributes inherited from Node

#isa, #uuid

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(root, uuid, data) ⇒ PBXBuildFile

Returns a new instance of PBXBuildFile.



31
32
33
34
35
# File 'lib/xcodeproject/pbx_build_file.rb', line 31

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

  @file_ref = data['fileRef']
end

Instance Attribute Details

#file_refObject (readonly)

Returns the value of attribute file_ref.



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

def file_ref
  @file_ref
end

Class Method Details

.add(root, file_ref_uuid) ⇒ Object



46
47
48
49
# File 'lib/xcodeproject/pbx_build_file.rb', line 46

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

Instance Method Details

#remove!Object



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

def remove!
  root.project.targets.each {|target| target.remove_source(self) }
  root.remove_object(uuid)
end