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 48
def self.add(root, file_ref_uuid)
  uuid, data = root.add_object(create_object_hash(file_ref_uuid))
  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 55
def self.create_object_hash(file_ref_uuid)
  data = []
  data << %w[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 do |target|
    target.remove_source(self)
  end
  root.remove_object(uuid)
end