Module: Pod::Podfile::DSL

Defined in:
lib/helper/podfile_options.rb

Instance Method Summary collapse

Instance Method Details

#localpod(name = nil, *requirements) ⇒ Object Also known as: lpod



8
9
10
11
12
13
14
15
16
17
18
19
20
21
# File 'lib/helper/podfile_options.rb', line 8

def localpod(name = nil, *requirements)
  local_path = nil
  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
  if local_path
    requirements.pop
    requirements.push({:path => local_path})
  end
  pod(name, *requirements)
end