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.
34 35 36 37 38 39 40 41 42 |
# File 'lib/xcodeproject/pbx_native_target.rb', line 34 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.
32 33 34 |
# File 'lib/xcodeproject/pbx_native_target.rb', line 32 def dependencies @dependencies end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
28 29 30 |
# File 'lib/xcodeproject/pbx_native_target.rb', line 28 def name @name end |
#product_name ⇒ Object (readonly)
Returns the value of attribute product_name.
29 30 31 |
# File 'lib/xcodeproject/pbx_native_target.rb', line 29 def product_name @product_name end |
#product_reference ⇒ Object (readonly)
Returns the value of attribute product_reference.
30 31 32 |
# File 'lib/xcodeproject/pbx_native_target.rb', line 30 def product_reference @product_reference end |
#product_type ⇒ Object (readonly)
Returns the value of attribute product_type.
31 32 33 |
# File 'lib/xcodeproject/pbx_native_target.rb', line 31 def product_type @product_type end |
Instance Method Details
#add_source(file) ⇒ Object
48 49 50 |
# File 'lib/xcodeproject/pbx_native_target.rb', line 48 def add_source (file) sources_build_phase.add_file(file) end |
#build_configurations_list ⇒ Object
64 65 66 |
# File 'lib/xcodeproject/pbx_native_target.rb', line 64 def build_configurations_list root.object!(data['buildConfigurationList']) end |
#build_phases ⇒ Object
68 69 70 |
# File 'lib/xcodeproject/pbx_native_target.rb', line 68 def build_phases data['buildPhases'].map {|uuid| root.object!(uuid) } end |
#config(name) ⇒ Object
60 61 62 |
# File 'lib/xcodeproject/pbx_native_target.rb', line 60 def config (name) build_configurations_list.build_configuration(name) end |
#configs ⇒ Object
56 57 58 |
# File 'lib/xcodeproject/pbx_native_target.rb', line 56 def configs build_configurations_list.build_configurations end |
#doctor ⇒ Object
88 89 90 |
# File 'lib/xcodeproject/pbx_native_target.rb', line 88 def doctor build_phases.each {|phase| phase.doctor } end |
#frameworks_build_phase ⇒ Object
84 85 86 |
# File 'lib/xcodeproject/pbx_native_target.rb', line 84 def frameworks_build_phase build_phases.select {|obj| obj.is_a?(PBXFrameworksBuildPhase) }.first end |
#headers_build_phase ⇒ Object
76 77 78 |
# File 'lib/xcodeproject/pbx_native_target.rb', line 76 def headers_build_phase build_phases.select {|obj| obj.is_a?(PBXHeadersBuildPhase) }.first end |
#remove_source(file) ⇒ Object
52 53 54 |
# File 'lib/xcodeproject/pbx_native_target.rb', line 52 def remove_source (file) sources_build_phase.remove_file(file) end |
#resources_build_phase ⇒ Object
80 81 82 |
# File 'lib/xcodeproject/pbx_native_target.rb', line 80 def resources_build_phase build_phases.select {|obj| obj.is_a?(PBXResourcesBuildPhase) }.first end |
#sources ⇒ Object
44 45 46 |
# File 'lib/xcodeproject/pbx_native_target.rb', line 44 def sources sources_build_phase.files end |
#sources_build_phase ⇒ Object
72 73 74 |
# File 'lib/xcodeproject/pbx_native_target.rb', line 72 def sources_build_phase build_phases.select {|obj| obj.is_a?(PBXSourcesBuildPhase) }.first end |