class Pod::HeaderMapsCache

Cache header maps content for `incremental_installation` option

Attributes

project_headers_cache[R]
targets_headers_cache[R]

Public Class Methods

from_file(path) click to toggle source
# File lib/cocoapods-headermap/header_maps_generator.rb, line 132
def self.from_file(path)
    return HeaderMapsCache.new unless File.exist?(path)

    yaml_content = YAMLHelper.load_file(path)
    project_headers_cache = yaml_content.fetch("PROJECT_HEADERS", {})
    targets_headers_cache = yaml_content.fetch("TARGETS_HEADERS", {})
    new(project_headers_cache, targets_headers_cache)
end
new(project_headers_cache = {}, targets_headers_cache = {}) click to toggle source
# File lib/cocoapods-headermap/header_maps_generator.rb, line 127
def initialize(project_headers_cache = {}, targets_headers_cache = {})
    @project_headers_cache = project_headers_cache
    @targets_headers_cache = targets_headers_cache
end

Public Instance Methods

save_as(path) click to toggle source
# File lib/cocoapods-headermap/header_maps_generator.rb, line 153
def save_as(path)
    Pathname(path).dirname.mkpath
    Sandbox.update_changed_file(path, YAMLHelper.convert(to_hash))
end
to_hash() click to toggle source
# File lib/cocoapods-headermap/header_maps_generator.rb, line 146
def to_hash
    yaml_content = {}
    yaml_content["PROJECT_HEADERS"] = project_headers_cache if project_headers_cache
    yaml_content["TARGETS_HEADERS"] = targets_headers_cache if targets_headers_cache
    yaml_content
end
update_headers!(project_headers_by_target, targets_headers_by_target) click to toggle source
# File lib/cocoapods-headermap/header_maps_generator.rb, line 141
def update_headers!(project_headers_by_target, targets_headers_by_target)
    @project_headers_cache = project_headers_by_target
    @targets_headers_cache = targets_headers_by_target
end