Class: XcodeProject::PBXNativeTarget
- Defined in:
- lib/xcodeproject/pbx_native_target.rb
Instance Attribute Summary collapse
-
#dependencies ⇒ Object
readonly
Returns the value of attribute dependencies.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#product_name ⇒ Object
readonly
Returns the value of attribute product_name.
-
#product_reference ⇒ Object
readonly
Returns the value of attribute product_reference.
-
#product_type ⇒ Object
readonly
Returns the value of attribute product_type.
Attributes inherited from Node
Instance Method Summary collapse
- #add_source(file) ⇒ Object
- #build_configurations_list ⇒ Object
- #build_phases ⇒ Object
- #config(name) ⇒ Object
- #configs ⇒ Object
- #doctor ⇒ Object
- #frameworks_build_phase ⇒ Object
- #headers_build_phase ⇒ Object
-
#initialize(root, uuid, data) ⇒ PBXNativeTarget
constructor
A new instance of PBXNativeTarget.
- #remove_source(file) ⇒ Object
- #resources_build_phase ⇒ Object
- #sources ⇒ Object
- #sources_build_phase ⇒ Object
Constructor Details
#initialize(root, uuid, data) ⇒ PBXNativeTarget
Returns a new instance of PBXNativeTarget.
36 37 38 39 40 41 42 43 44 |
# File 'lib/xcodeproject/pbx_native_target.rb', line 36 def initialize(root, uuid, data) super(root, uuid, data) @name = data['name'] @product_name = data['productName'] @product_reference = data['productReference'] @product_type = data['productType'] @dependencies = data['dependencies'] end |
Instance Attribute Details
#dependencies ⇒ Object (readonly)
Returns the value of attribute dependencies.
34 35 36 |
# File 'lib/xcodeproject/pbx_native_target.rb', line 34 def dependencies @dependencies end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
30 31 32 |
# File 'lib/xcodeproject/pbx_native_target.rb', line 30 def name @name end |
#product_name ⇒ Object (readonly)
Returns the value of attribute product_name.
31 32 33 |
# File 'lib/xcodeproject/pbx_native_target.rb', line 31 def product_name @product_name end |
#product_reference ⇒ Object (readonly)
Returns the value of attribute product_reference.
32 33 34 |
# File 'lib/xcodeproject/pbx_native_target.rb', line 32 def product_reference @product_reference end |
#product_type ⇒ Object (readonly)
Returns the value of attribute product_type.
33 34 35 |
# File 'lib/xcodeproject/pbx_native_target.rb', line 33 def product_type @product_type end |
Instance Method Details
#add_source(file) ⇒ Object
50 51 52 |
# File 'lib/xcodeproject/pbx_native_target.rb', line 50 def add_source(file) sources_build_phase.add_file(file) end |
#build_configurations_list ⇒ Object
66 67 68 |
# File 'lib/xcodeproject/pbx_native_target.rb', line 66 def build_configurations_list root.object!(data['buildConfigurationList']) end |
#build_phases ⇒ Object
70 71 72 |
# File 'lib/xcodeproject/pbx_native_target.rb', line 70 def build_phases data['buildPhases'].map { |uuid| root.object!(uuid) } end |
#config(name) ⇒ Object
62 63 64 |
# File 'lib/xcodeproject/pbx_native_target.rb', line 62 def config(name) build_configurations_list.build_configuration(name) end |
#configs ⇒ Object
58 59 60 |
# File 'lib/xcodeproject/pbx_native_target.rb', line 58 def configs build_configurations_list.build_configurations end |
#doctor ⇒ Object
90 91 92 |
# File 'lib/xcodeproject/pbx_native_target.rb', line 90 def doctor build_phases.each(&:doctor) end |
#frameworks_build_phase ⇒ Object
86 87 88 |
# File 'lib/xcodeproject/pbx_native_target.rb', line 86 def frameworks_build_phase build_phases.select { |obj| obj.is_a?(PBXFrameworksBuildPhase) }.first end |
#headers_build_phase ⇒ Object
78 79 80 |
# File 'lib/xcodeproject/pbx_native_target.rb', line 78 def headers_build_phase build_phases.select { |obj| obj.is_a?(PBXHeadersBuildPhase) }.first end |
#remove_source(file) ⇒ Object
54 55 56 |
# File 'lib/xcodeproject/pbx_native_target.rb', line 54 def remove_source(file) sources_build_phase.remove_file(file) end |
#resources_build_phase ⇒ Object
82 83 84 |
# File 'lib/xcodeproject/pbx_native_target.rb', line 82 def resources_build_phase build_phases.select { |obj| obj.is_a?(PBXResourcesBuildPhase) }.first end |
#sources ⇒ Object
46 47 48 |
# File 'lib/xcodeproject/pbx_native_target.rb', line 46 def sources sources_build_phase.files end |
#sources_build_phase ⇒ Object
74 75 76 |
# File 'lib/xcodeproject/pbx_native_target.rb', line 74 def sources_build_phase build_phases.select { |obj| obj.is_a?(PBXSourcesBuildPhase) }.first end |