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.
-
#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.
83 84 85 86 |
# File 'lib/xcodeproj/project/object/build_rule.rb', line 83 def add_output_file(file, compiler_flags = '') (self.output_files ||= []) << file (self.output_files_compiler_flags ||= []) << compiler_flags end |
#ascii_plist_annotation ⇒ Object
96 97 98 |
# File 'lib/xcodeproj/project/object/build_rule.rb', line 96 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 |
#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`.
35 |
# File 'lib/xcodeproj/project/object/build_rule.rb', line 35 attribute :file_patterns, String |
#file_type ⇒ String
Returns the type of the files that should be processed by this rule.
26 |
# File 'lib/xcodeproj/project/object/build_rule.rb', line 26 attribute :file_type, String |
#input_files ⇒ ObjectList<PBXFileReference>
Returns the file references for the input files files.
47 |
# File 'lib/xcodeproj/project/object/build_rule.rb', line 47 attribute :input_files, Array |
#is_editable ⇒ String
Returns whether the rule is editable.
42 |
# File 'lib/xcodeproj/project/object/build_rule.rb', line 42 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.
52 |
# File 'lib/xcodeproj/project/object/build_rule.rb', line 52 attribute :output_files, Array |
#output_files_and_flags ⇒ Array<[PBXFileReference, String]>
Returns An array containing tuples of output files and their compiler flags.
92 93 94 |
# File 'lib/xcodeproj/project/object/build_rule.rb', line 92 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.
57 |
# File 'lib/xcodeproj/project/object/build_rule.rb', line 57 attribute :output_files_compiler_flags, Array |
#run_once_per_architecture ⇒ String
Returns whether the rule should be run once per architecture.
64 |
# File 'lib/xcodeproj/project/object/build_rule.rb', line 64 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.
71 |
# File 'lib/xcodeproj/project/object/build_rule.rb', line 71 attribute :script, String |