Class: Pod::Generator::UmbrellaHeader
- Defined in:
- lib/cocoapods/generator/umbrella_header.rb
Overview
Generates an umbrella header file for clang modules, which are used by dynamic frameworks on iOS 8 and OSX 10.10 under the hood.
If the target is a PodTarget
, then the umbrella header is required to make all public headers in a convenient manner available without the need to write out header declarations for every library header.
Instance Attribute Summary collapse
-
#target ⇒ Target
readonly
The target, which provides the product name.
Attributes inherited from Header
#imports, #module_imports, #platform
Instance Method Summary collapse
-
#generate ⇒ String
Generates the contents of the umbrella header according to the included pods.
-
#initialize(target) ⇒ UmbrellaHeader
constructor
Initialize a new instance.
Methods inherited from Header
Constructor Details
#initialize(target) ⇒ UmbrellaHeader
Initialize a new instance
20 21 22 23 |
# File 'lib/cocoapods/generator/umbrella_header.rb', line 20 def initialize(target) super(target.platform) @target = target end |
Instance Attribute Details
#target ⇒ Target (readonly)
Returns the target, which provides the product name.
13 14 15 |
# File 'lib/cocoapods/generator/umbrella_header.rb', line 13 def target @target end |
Instance Method Details
#generate ⇒ String
Generates the contents of the umbrella header according to the included pods.
30 31 32 33 34 35 36 37 38 39 40 41 42 43 |
# File 'lib/cocoapods/generator/umbrella_header.rb', line 30 def generate result = super result << "\n" result << <<-eos.strip_heredoc FOUNDATION_EXPORT double #{target.product_module_name}VersionNumber; FOUNDATION_EXPORT const unsigned char #{target.product_module_name}VersionString[]; eos result << "\n" result end |