Class: Pod::Podfile::TargetDefinition

Inherits:
Object
  • Object
show all
Defined in:
lib/helper/podfile_options.rb

Instance Method Summary collapse

Instance Method Details

#parse_requirements(name, requirements) ⇒ Object



28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
# File 'lib/helper/podfile_options.rb', line 28

def parse_requirements(name, requirements)

  local_path = nil

  options = requirements.last
  if options.is_a?(Hash) && options[:local] == true
    local_root = ENV['POD_LOCAL_ROOT']
    if !local_root
      UI.warn '环境变量中未发现 POD_LOCAL_ROOT 定义'
    elsif local_root.length
      local_path = File.join(local_root, Pod::repo_name(name))
    end
  end

  if local_path
    requirements.pop
    requirements.push({:path => local_path})
  end
end