Class: Pod::Installer::SPMAnalyzer

Inherits:
Object
  • Object
show all
Defined in:
lib/cocoapods-spm/installer/analyzer.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(podfile, aggregate_targets) ⇒ SPMAnalyzer

Returns a new instance of SPMAnalyzer.



8
9
10
11
12
13
# File 'lib/cocoapods-spm/installer/analyzer.rb', line 8

def initialize(podfile, aggregate_targets)
  @podfile = podfile
  @aggregate_targets = aggregate_targets
  @spm_pkgs = []
  @spm_dependencies_by_target = {}
end

Instance Attribute Details

#spm_dependencies_by_targetObject (readonly)

Returns the value of attribute spm_dependencies_by_target.



6
7
8
# File 'lib/cocoapods-spm/installer/analyzer.rb', line 6

def spm_dependencies_by_target
  @spm_dependencies_by_target
end

#spm_pkgsObject (readonly)

Returns the value of attribute spm_pkgs.



6
7
8
# File 'lib/cocoapods-spm/installer/analyzer.rb', line 6

def spm_pkgs
  @spm_pkgs
end

Instance Method Details

#analyzeObject



15
16
17
18
19
# File 'lib/cocoapods-spm/installer/analyzer.rb', line 15

def analyze
  analyze_spm_pkgs
  analyze_spm_dependencies_by_target
  validate!
end

#spm_dependencies_for(target) ⇒ Object



21
22
23
# File 'lib/cocoapods-spm/installer/analyzer.rb', line 21

def spm_dependencies_for(target)
  @spm_dependencies_by_target[target.to_s]
end