Class: XcodeArchiveCache::BuildSettings::Loader
- Inherits:
-
Object
- Object
- XcodeArchiveCache::BuildSettings::Loader
- Defined in:
- lib/build_settings/loader.rb
Instance Method Summary collapse
-
#get_settings(project_path, target_name) ⇒ Hash{String => String}
Build settings for target or nil.
-
#initialize(executor) ⇒ Loader
constructor
A new instance of Loader.
- #load_settings(project_paths) ⇒ Object
Constructor Details
Instance Method Details
#get_settings(project_path, target_name) ⇒ Hash{String => String}
Returns build settings for target or nil.
73 74 75 76 77 78 |
# File 'lib/build_settings/loader.rb', line 73 def get_settings(project_path, target_name) project_settings = get_project_settings(project_path) return nil unless project_settings project_settings[target_name] end |
#load_settings(project_paths) ⇒ Object
51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 |
# File 'lib/build_settings/loader.rb', line 51 def load_settings(project_paths) paths_without_settings = project_paths.select {|path| get_project_settings(path) == nil} threads = paths_without_settings.map do |path| Thread.new(path) do |project_path| Thread.current.abort_on_exception = true [project_path, executor.load_build_settings(project_path)] end end threads.each do |thread| project_path, all_targets_settings = thread.value per_target_settings = extractor.extract_per_target(all_targets_settings) set_project_settings(project_path, per_target_settings) end end |