lib/cocoapods/installer/file_references_installer.rb
def header_mappings(headers_sandbox, file_accessor, headers)
        consumer = file_accessor.spec_consumer
        dir = headers_sandbox
        dir = dir + consumer.header_dir if consumer.header_dir

        mappings = {}
        headers.each do |header|
          sub_dir = dir
          if consumer.header_mappings_dir
            header_mappings_dir = file_accessor.path_list.root + consumer.header_mappings_dir
            relative_path = header.relative_path_from(header_mappings_dir)
            sub_dir = sub_dir + relative_path.dirname
          end
          mappings[sub_dir] ||= []
          mappings[sub_dir] << header
        end
        mappings
      end
# Computes the destination sub-directory in the sandbox
#
# @param  [Pathname] headers_sandbox
#         The sandbox where the headers links should be stored for this
#         Pod.
#
# @param  [Specification::Consumer] consumer
#         The consumer for which the headers need to be linked.
#
# @param  [Array<Pathname>] headers
#         The absolute paths of the headers which need to be mapped.
#
# @return [Hash{Pathname => Array<Pathname>}] A hash containing the
#         headers folders as the keys and the absolute paths of the
#         header files as the values.
#
Computes the destination sub-directory in the sandbox
Computes the destination sub - directory in the sandbox
def header_mappings(headers_sandbox, file_accessor, headers)
        consumer = file_accessor.spec_consumer
        dir = headers_sandbox
        dir = dir + consumer.header_dir if consumer.header_dir
        mappings = {}
        headers.each do |header|
          sub_dir = dir
          if consumer.header_mappings_dir
            header_mappings_dir = file_accessor.path_list.root + consumer.header_mappings_dir
            relative_path = header.relative_path_from(header_mappings_dir)
            sub_dir = sub_dir + relative_path.dirname
          end
          mappings[sub_dir] ||= []
          mappings[sub_dir] << header
        end
        mappings
      end
def header_mappings ( headers_sandbox , file_accessor , headers ) consumer = file_accessor . spec_consumer dir = headers_sandbox dir = dir + consumer . header_dir if consumer . header_dir mappings = { } headers . each do | header | sub_dir = dir if consumer . header_mappings_dir header_mappings_dir = file_accessor . path_list . root + consumer . header_mappings_dir relative_path = header . relative_path_from ( header_mappings_dir ) sub_dir = sub_dir + relative_path . dirname end mappings [ sub_dir ] ||= [ ] mappings [ sub_dir ] << header end mappings end
Computes the destination sub-directory in the sandbox
Computes the destination sub - directory in the sandbox
A hash containing the headers folders as the keys and the absolute paths of the header files as the values.
A hash containing the headers folders as the keys and the absolute paths of the header files as the values .
Hash{Pathname => Array<Pathname>}
headers_sandbox
file_accessor
headers
headers The absolute paths of the headers which need to be mapped.
headers The absolute paths of the headers which need to be mapped .