class XcodeProject::PBXBuildFile

Attributes

file_ref[R]

Public Class Methods

add(root, file_ref_uuid) click to toggle source
# 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
new(root, uuid, data) click to toggle source
Calls superclass method XcodeProject::Node::new
# File lib/xcodeproject/pbx_build_file.rb, line 31
def initialize (root, uuid, data)
        super(root, uuid, data)

        @file_ref = data['fileRef']
end

Private Class Methods

create_object_hash(file_ref_uuid) click to toggle source
# File lib/xcodeproject/pbx_build_file.rb, line 53
def self.create_object_hash (file_ref_uuid)
        data = []
        data << ['isa', 'PBXBuildFile']
        data << ['fileRef', file_ref_uuid]
        
        Hash[ data ]
end

Public Instance Methods

remove!() click to toggle source
# 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