Commit b3a77a6f authored by Fabio Pelosin's avatar Fabio Pelosin

[PrefixHeader] Style fixes

parent 2ef0db19
......@@ -9,18 +9,18 @@ module Pod
#
class PrefixHeader
# @return [Platform] the platform for which the prefix header will be
# generated.
# @return [Array<FileAccessor>] The file accessors for which to generate
# the prefix header.
#
attr_reader :file_accessors
attr_reader :platform
# @return [Array<LocalPod>] the LocalPod for the target for which the
# prefix header needs to be generated.
# @return [Platform] the platform for which the prefix header will be
# 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
......@@ -40,12 +40,14 @@ module Pod
# added to the top of the prefix header. For OS X `Cocoa/Cocoa.h`
# 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]
#
# @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
result = "#ifdef __OBJC__\n"
......@@ -59,14 +61,14 @@ module Pod
unique_prefix_header_contents = file_accessors.collect do |file_accessor|
file_accessor.spec_consumer.prefix_header_contents
end.compact.uniq
result << "\n"
unique_prefix_header_contents.each do |prefix_header_contents|
result << prefix_header_contents
result << "\n"
end
file_accessors.each do |file_accessor|
if prefix_header = file_accessor.prefix_header
result << Pathname(prefix_header).read
......
......@@ -44,7 +44,7 @@ module Pod
@spec.subspec 'UI' do |su|
su.source_files = 'Source/UI/*.{h,m}'
end
@spec.subspec 'Helpers' do |sh|
sh.source_files = 'Source/Helpers/*.{h,m}'
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