Class: Pod::Podfile::TargetDefinition

Inherits:
Object
  • Object
show all
Defined in:
lib/cocoapods-binary-cache/pod-binary/helper/detected_prebuilt_pods/target_definition.rb

Instance Method Summary collapse

Instance Method Details

#detect_prebuilt_pod(name, requirements) ⇒ Object



4
5
6
7
8
9
10
11
12
13
14
# File 'lib/cocoapods-binary-cache/pod-binary/helper/detected_prebuilt_pods/target_definition.rb', line 4

def detect_prebuilt_pod(name, requirements)
  @explicit_prebuilt_pod_names ||= []
  options = requirements.last
  if Pod::Podfile::DSL.prebuild_all?
    @explicit_prebuilt_pod_names << Specification.root_name(name)
  elsif options.is_a?(Hash) && options[:binary]
    @explicit_prebuilt_pod_names << Specification.root_name(name)
  end
  options.delete(:binary) if options.is_a?(Hash)
  requirements.pop if options.empty?
end

#explicit_prebuilt_pod_namesObject

Returns the names of pod targets explicitly declared as prebuilt in Podfile using ‘:binary => true`. In case prebuild_all is ON via config_cocoapods_binary_cache, returns the name of all pod targets



20
21
22
23
24
# File 'lib/cocoapods-binary-cache/pod-binary/helper/detected_prebuilt_pods/target_definition.rb', line 20

def explicit_prebuilt_pod_names
  names = @explicit_prebuilt_pod_names || []
  names += parent.explicit_prebuilt_pod_names if !parent.nil? && parent.is_a?(TargetDefinition)
  names
end