Class: Pod::Podfile::TargetDefinition

Inherits:
Object
  • Object
show all
Defined in:
lib/cocoapods-binary-ht/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
# File 'lib/cocoapods-binary-ht/pod-binary/helper/detected_prebuilt_pods/target_definition.rb', line 4

def detect_prebuilt_pod(name, requirements)
  @explicit_prebuilt_pod_names ||= []
  options = requirements.last || {}
  @explicit_prebuilt_pod_names << Specification.root_name(name) if options.is_a?(Hash) && options[:binary]
  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`.



13
14
15
16
17
# File 'lib/cocoapods-binary-ht/pod-binary/helper/detected_prebuilt_pods/target_definition.rb', line 13

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