Module: Pod

Defined in:
lib/cocoapods-binaryhqp/Prebuild.rb,
lib/cocoapods-binaryhqp/Main.rb,
lib/cocoapods-binaryhqp/Integration.rb,
lib/cocoapods-binaryhqp/Integration.rb,
lib/cocoapods-binaryhqp/Integration.rb,
lib/cocoapods-binaryhqp/helper/names.rb,
lib/cocoapods-binaryhqp/helper/passer.rb,
lib/cocoapods-binaryhqp/rome/build_framework.rb,
lib/cocoapods-binaryhqp/helper/target_checker.rb,
lib/cocoapods-binaryhqp/helper/podfile_options.rb,
lib/cocoapods-binaryhqp/helper/podfile_options.rb,
lib/cocoapods-binaryhqp/helper/feature_switches.rb,
lib/cocoapods-binaryhqp/helper/prebuild_sandbox.rb,
lib/cocoapods-binaryhqp/command_option/command_option.rb,
lib/cocoapods-binaryhqp/command_option/command_option.rb

Overview

Tool to transform Pod_name to target efficiently

Defined Under Namespace

Modules: Generator Classes: Command, Config, Installer, Podfile, Prebuild, PrebuildSandbox

Class Method Summary collapse

Class Method Details

.fast_get_targets_for_pod_name(pod_name, targets, cache) ⇒ Object



19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
# File 'lib/cocoapods-binaryhqp/helper/names.rb', line 19

def self.fast_get_targets_for_pod_name(pod_name, targets, cache)
    pod_name_to_targets_hash = nil
    if cache.empty?
        pod_name_to_targets_hash = targets.reduce({}) do |sum, target|
            array = sum[target.pod_name] || []
            array << target
            sum[target.pod_name] = array
            sum
        end
        cache << pod_name_to_targets_hash
    else
        pod_name_to_targets_hash = cache.first
    end
    
    pod_name_to_targets_hash[pod_name] || []
end