Class: Xcake::HeadersBuildPhase
- Inherits:
-
BuildPhase
- Object
- BuildPhase
- Xcake::HeadersBuildPhase
- Defined in:
- lib/xcake/dsl/build_phase/headers_build_phase.rb
Overview
This class is used to represent a copy headers build phase
Instance Attribute Summary collapse
-
#private ⇒ Object
Returns the value of attribute private.
-
#project ⇒ Object
Returns the value of attribute project.
-
#public ⇒ Object
Returns the value of attribute public.
Instance Method Summary collapse
- #build_phase_type ⇒ Object
- #configure_native_build_phase(native_build_phase, context) ⇒ Object
-
#initialize {|_self| ... } ⇒ HeadersBuildPhase
constructor
A new instance of HeadersBuildPhase.
- #to_s ⇒ Object
Constructor Details
#initialize {|_self| ... } ⇒ HeadersBuildPhase
Returns a new instance of HeadersBuildPhase.
12 13 14 15 16 17 18 |
# File 'lib/xcake/dsl/build_phase/headers_build_phase.rb', line 12 def initialize @public = [] @private = [] @project = [] yield(self) if block_given? end |
Instance Attribute Details
#private ⇒ Object
Returns the value of attribute private.
9 10 11 |
# File 'lib/xcake/dsl/build_phase/headers_build_phase.rb', line 9 def private @private end |
#project ⇒ Object
Returns the value of attribute project.
10 11 12 |
# File 'lib/xcake/dsl/build_phase/headers_build_phase.rb', line 10 def project @project end |
#public ⇒ Object
Returns the value of attribute public.
8 9 10 |
# File 'lib/xcake/dsl/build_phase/headers_build_phase.rb', line 8 def public @public end |
Instance Method Details
#build_phase_type ⇒ Object
20 21 22 |
# File 'lib/xcake/dsl/build_phase/headers_build_phase.rb', line 20 def build_phase_type Xcodeproj::Project::Object::PBXHeadersBuildPhase end |
#configure_native_build_phase(native_build_phase, context) ⇒ Object
24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 |
# File 'lib/xcake/dsl/build_phase/headers_build_phase.rb', line 24 def configure_native_build_phase(native_build_phase, context) @public.each do |file| file_reference = context.file_reference_for_path(file) build_file = native_build_phase.add_file_reference(file_reference) build_file.settings = PUBLIC_HEADER_ATTRIBUTE end @private.each do |file| file_reference = context.file_reference_for_path(file) build_file = native_build_phase.add_file_reference(file_reference) build_file.settings = PRIVATE_HEADER_ATTRIBUTE end @project.each do |file| file_reference = context.file_reference_for_path(file) native_build_phase.add_file_reference(file_reference) end end |
#to_s ⇒ Object
43 44 45 |
# File 'lib/xcake/dsl/build_phase/headers_build_phase.rb', line 43 def to_s 'BuildPhase<Copy Headers>' end |