Class: Pod::Source::Manager

Inherits:
Object
  • Object
show all
Defined in:
lib/cocoapods-nexus/hook/manager.rb

Instance Method Summary collapse

Instance Method Details

#orgin_source_from_pathObject



7
# File 'lib/cocoapods-nexus/hook/manager.rb', line 7

alias orgin_source_from_path source_from_path

#source_from_path(path) ⇒ Object



9
10
11
12
13
14
15
16
17
18
19
# File 'lib/cocoapods-nexus/hook/manager.rb', line 9

def source_from_path(path)
  @new_sources_by_path ||= Hash.new do |hash, key|
    nexus_file_path = File.join(key, ".nexus")
    hash[key] = if File.exist?(nexus_file_path)
                  Pod::NexusSource.new(key, File.read(nexus_file_path))
                else
                  orgin_source_from_path(key)
                end
  end
  @new_sources_by_path[path]
end