Commit b3a77a6f authored by Fabio Pelosin's avatar Fabio Pelosin

[PrefixHeader] Style fixes

parent 2ef0db19
...@@ -9,18 +9,18 @@ module Pod ...@@ -9,18 +9,18 @@ module Pod
# #
class PrefixHeader class PrefixHeader
# @return [Platform] the platform for which the prefix header will be # @return [Array<FileAccessor>] The file accessors for which to generate
# generated. # the prefix header.
# #
attr_reader :file_accessors attr_reader :file_accessors
attr_reader :platform
# @return [Array<LocalPod>] the LocalPod for the target for which the # @return [Platform] the platform for which the prefix header will be
# prefix header needs to be generated. # generated.
# #
# attr_reader :consumers attr_reader :platform
# @return [Array<String>] any header to import (with quotes). # @return [Array<String>] The list of the headers to import (with
# quotes).
# #
attr_reader :imports attr_reader :imports
...@@ -40,12 +40,14 @@ module Pod ...@@ -40,12 +40,14 @@ module Pod
# added to the top of the prefix header. For OS X `Cocoa/Cocoa.h` # added to the top of the prefix header. For OS X `Cocoa/Cocoa.h`
# is imported. # is imported.
# #
# @note Only unique prefix_header_contents are added to the prefix header. # @note Only unique prefix_header_contents are added to the prefix
# header.
# #
# @return [String] # @return [String]
# #
# @todo Subspecs can specify prefix header information too. # @todo Subspecs can specify prefix header information too.
# @todo Check to see if we have a similar duplication issue with file_accessor.prefix_header. # @todo Check to see if we have a similar duplication issue with
# file_accessor.prefix_header.
# #
def generate def generate
result = "#ifdef __OBJC__\n" result = "#ifdef __OBJC__\n"
...@@ -59,14 +61,14 @@ module Pod ...@@ -59,14 +61,14 @@ module Pod
unique_prefix_header_contents = file_accessors.collect do |file_accessor| unique_prefix_header_contents = file_accessors.collect do |file_accessor|
file_accessor.spec_consumer.prefix_header_contents file_accessor.spec_consumer.prefix_header_contents
end.compact.uniq end.compact.uniq
result << "\n" result << "\n"
unique_prefix_header_contents.each do |prefix_header_contents| unique_prefix_header_contents.each do |prefix_header_contents|
result << prefix_header_contents result << prefix_header_contents
result << "\n" result << "\n"
end end
file_accessors.each do |file_accessor| file_accessors.each do |file_accessor|
if prefix_header = file_accessor.prefix_header if prefix_header = file_accessor.prefix_header
result << Pathname(prefix_header).read result << Pathname(prefix_header).read
......
...@@ -44,7 +44,7 @@ module Pod ...@@ -44,7 +44,7 @@ module Pod
@spec.subspec 'UI' do |su| @spec.subspec 'UI' do |su|
su.source_files = 'Source/UI/*.{h,m}' su.source_files = 'Source/UI/*.{h,m}'
end end
@spec.subspec 'Helpers' do |sh| @spec.subspec 'Helpers' do |sh|
sh.source_files = 'Source/Helpers/*.{h,m}' sh.source_files = 'Source/Helpers/*.{h,m}'
end end
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment