Class: Tdfire::SourceChainAnalyzer

Inherits:
Object
  • Object
show all
Defined in:
lib/cocoapods-tdfire-binary/source_chain_analyzer.rb

Instance Method Summary collapse

Constructor Details

#initialize(podfile) ⇒ SourceChainAnalyzer

Returns a new instance of SourceChainAnalyzer.



4
5
6
7
8
# File 'lib/cocoapods-tdfire-binary/source_chain_analyzer.rb', line 4

def initialize(podfile)
	@lockfile = generate_lockfile(podfile)
	@pods_data = @lockfile.internal_data['PODS']
	@parent_pods = []
end

Instance Method Details

#analyze(pods) ⇒ Object



12
13
14
15
16
17
18
# File 'lib/cocoapods-tdfire-binary/source_chain_analyzer.rb', line 12

def analyze(pods)
	pods.each do |pod|
		find_parent_pods(pod, @pods_data) unless @parent_pods.include?(pod)
	end unless @lockfile.nil?

	@parent_pods.map{ |pod| pod.split('/', 2).first }.uniq
end