Class: XcodeProject::PBXBuildFile
- Defined in:
- lib/xcodeproject/pbx_build_file.rb
Instance Attribute Summary collapse
-
#file_ref ⇒ Object
readonly
Returns the value of attribute file_ref.
Attributes inherited from Node
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(root, uuid, data) ⇒ PBXBuildFile
constructor
A new instance of PBXBuildFile.
- #remove! ⇒ Object
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_ref ⇒ Object (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
48 49 50 51 |
# 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 |
.create_object_hash(file_ref_uuid) ⇒ Object
55 56 57 58 59 60 61 |
# 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 |