Class: PodPrebuild::CachePrebuilder

Inherits:
CommandExecutor show all
Defined in:
lib/command/executor/prebuilder.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from CommandExecutor

#installer, #prepare_cache_dir, #use_local_cache?

Constructor Details

#initialize(options) ⇒ CachePrebuilder

Returns a new instance of CachePrebuilder.



8
9
10
11
# File 'lib/command/executor/prebuilder.rb', line 8

def initialize(options)
  super(options)
  @repo_update = options[:repo_update]
end

Instance Attribute Details

#fetcherObject (readonly)

Returns the value of attribute fetcher.



6
7
8
# File 'lib/command/executor/prebuilder.rb', line 6

def fetcher
  @fetcher
end

#pusherObject (readonly)

Returns the value of attribute pusher.



6
7
8
# File 'lib/command/executor/prebuilder.rb', line 6

def pusher
  @pusher
end

#repo_updateObject (readonly)

Returns the value of attribute repo_update.



6
7
8
# File 'lib/command/executor/prebuilder.rb', line 6

def repo_update
  @repo_update
end

Instance Method Details

#runObject



13
14
15
16
17
18
19
# File 'lib/command/executor/prebuilder.rb', line 13

def run
  prebuild
  changes = PodPrebuild::JSONFile.new(@config.prebuild_delta_path)
  return if changes.empty?

  sync_cache(changes)
end