Class: PodPrebuild::CommandExecutor

Inherits:
Object
  • Object
show all
Defined in:
lib/command/executor/base.rb

Direct Known Subclasses

CacheFetcher, CachePrebuilder, Visualizer

Instance Method Summary collapse

Constructor Details

#initialize(options) ⇒ CommandExecutor

Returns a new instance of CommandExecutor.



3
4
5
6
# File 'lib/command/executor/base.rb', line 3

def initialize(options)
  @config = options[:config]
  prepare_cache_dir
end

Instance Method Details

#installerObject



8
9
10
11
12
13
# File 'lib/command/executor/base.rb', line 8

def installer
  @installer ||= begin
    pod_config = Pod::Config.instance
    Pod::Installer.new(pod_config.sandbox, pod_config.podfile, pod_config.lockfile)
  end
end

#prepare_cache_dirObject



19
20
21
# File 'lib/command/executor/base.rb', line 19

def prepare_cache_dir
  FileUtils.mkdir_p(@config.cache_path) if @config.cache_path
end

#use_local_cache?Boolean

Returns:

  • (Boolean)


15
16
17
# File 'lib/command/executor/base.rb', line 15

def use_local_cache?
  @config.cache_repo.nil?
end