Class: Pod::Local

Inherits:
Object
  • Object
show all
Defined in:
lib/podfileDep/thin/local.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeLocal

Returns a new instance of Local.



7
8
9
10
# File 'lib/podfileDep/thin/local.rb', line 7

def initialize
  super
  @reference_pods = []
end

Instance Attribute Details

#reference_podsString

PODFILE_LOCAL_YAML指定的依赖库

Returns:

  • (String)


14
15
16
# File 'lib/podfileDep/thin/local.rb', line 14

def reference_pods
  @reference_pods
end

Instance Method Details

#deps_yamlObject



16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
# File 'lib/podfileDep/thin/local.rb', line 16

def deps_yaml

  yaml_dep = YamlDep.new

  yaml_dep.generate_yaml

  podfile_local_yaml = yaml_dep.podfile_local_yaml
  yaml_dep.read_yaml_deps_file(podfile_local_yaml)

  yaml_dependencies = yaml_dep.yaml_deps[podfile_local_yaml]

  if yaml_dependencies
    # 处理烦人的子模块
    yaml_dependencies.keys.each do |pod|
      real_pod = pod.split("/")[0]
      unless reference_pods.include?(real_pod)
        reference_pods << real_pod
      end
    end
  end

  reference_pods
end