Class: Xcodeproj::Project::Object::PBXBuildRule
- Inherits:
-
AbstractObject
- Object
- AbstractObject
- Xcodeproj::Project::Object::PBXBuildRule
- Defined in:
- lib/xcodeproj/project/object/build_rule.rb
Overview
This class represents a custom build rule of a Target.
Instance Attribute Summary
Attributes inherited from AbstractObject
Attributes collapse
-
#compiler_spec ⇒ String
A string representing what compiler to use.
-
#dependency_file ⇒ String
The discovered dependency file to use.
-
#file_patterns ⇒ String
The pattern of the files that should be processed by this rule.
-
#file_type ⇒ String
The type of the files that should be processed by this rule.
-
#input_files ⇒ ObjectList<PBXFileReference>
The file references for the input files files.
-
#is_editable ⇒ String
Whether the rule is editable.
-
#name ⇒ String
The name of the rule.
-
#output_files ⇒ ObjectList<PBXFileReference>
The file references for the output files.
-
#output_files_compiler_flags ⇒ ObjectList<String>
The compiler flags used when creating the respective output files.
-
#run_once_per_architecture ⇒ String
Whether the rule should be run once per architecture.
-
#script ⇒ String
The content of the script to use for the build rule.
Helpers collapse
-
#add_output_file(file, compiler_flags = '') ⇒ Void
Adds an output file with the specified compiler flags.
- #ascii_plist_annotation ⇒ Object
-
#output_files_and_flags ⇒ Array<[PBXFileReference, String]>
An array containing tuples of output files and their compiler flags.
Methods inherited from AbstractObject
#<=>, #==, #display_name, #inspect, isa, #nested_object_for_hash, #pretty_print, #remove_from_project, #sort, #sort_recursively, #to_ascii_plist, #to_hash
Instance Method Details
#add_output_file(file, compiler_flags = '') ⇒ Void
Adds an output file with the specified compiler flags.
90 91 92 93 |
# File 'lib/xcodeproj/project/object/build_rule.rb', line 90 def add_output_file(file, compiler_flags = '') (self.output_files ||= []) << file (self.output_files_compiler_flags ||= []) << compiler_flags end |
#ascii_plist_annotation ⇒ Object
103 104 105 |
# File 'lib/xcodeproj/project/object/build_rule.rb', line 103 def ascii_plist_annotation " #{isa} " end |
#compiler_spec ⇒ String
Returns a string representing what compiler to use.
18 |
# File 'lib/xcodeproj/project/object/build_rule.rb', line 18 attribute :compiler_spec, String |
#dependency_file ⇒ String
Returns the discovered dependency file to use.
25 |
# File 'lib/xcodeproj/project/object/build_rule.rb', line 25 attribute :dependency_file, String |
#file_patterns ⇒ String
Returns the pattern of the files that should be processed by this rule. This attribute is an alternative to to ‘file_type`.
42 |
# File 'lib/xcodeproj/project/object/build_rule.rb', line 42 attribute :file_patterns, String |
#file_type ⇒ String
Returns the type of the files that should be processed by this rule.
33 |
# File 'lib/xcodeproj/project/object/build_rule.rb', line 33 attribute :file_type, String |
#input_files ⇒ ObjectList<PBXFileReference>
Returns the file references for the input files files.
54 |
# File 'lib/xcodeproj/project/object/build_rule.rb', line 54 attribute :input_files, Array |
#is_editable ⇒ String
Returns whether the rule is editable.
49 |
# File 'lib/xcodeproj/project/object/build_rule.rb', line 49 attribute :is_editable, String, '1' |
#name ⇒ String
Returns the name of the rule.
11 |
# File 'lib/xcodeproj/project/object/build_rule.rb', line 11 attribute :name, String |
#output_files ⇒ ObjectList<PBXFileReference>
Returns the file references for the output files.
59 |
# File 'lib/xcodeproj/project/object/build_rule.rb', line 59 attribute :output_files, Array |
#output_files_and_flags ⇒ Array<[PBXFileReference, String]>
Returns An array containing tuples of output files and their compiler flags.
99 100 101 |
# File 'lib/xcodeproj/project/object/build_rule.rb', line 99 def output_files_and_flags (output_files || []).zip(output_files_compiler_flags || []) end |
#output_files_compiler_flags ⇒ ObjectList<String>
Returns the compiler flags used when creating the respective output files.
64 |
# File 'lib/xcodeproj/project/object/build_rule.rb', line 64 attribute :output_files_compiler_flags, Array |
#run_once_per_architecture ⇒ String
Returns whether the rule should be run once per architecture.
71 |
# File 'lib/xcodeproj/project/object/build_rule.rb', line 71 attribute :run_once_per_architecture, String |
#script ⇒ String
This attribute is present if the ##compiler_spec is ‘com.apple.compilers.proxy.script`
Returns the content of the script to use for the build rule.
78 |
# File 'lib/xcodeproj/project/object/build_rule.rb', line 78 attribute :script, String |