Class: PodPrebuild::CachePrebuilder
- Inherits:
-
CommandExecutor
- Object
- CommandExecutor
- PodPrebuild::CachePrebuilder
- Defined in:
- lib/command/executor/prebuilder.rb
Instance Method Summary collapse
-
#initialize(options) ⇒ CachePrebuilder
constructor
A new instance of CachePrebuilder.
- #run ⇒ Object
Methods inherited from CommandExecutor
Constructor Details
#initialize(options) ⇒ CachePrebuilder
Returns a new instance of CachePrebuilder.
7 8 9 10 11 12 13 |
# File 'lib/command/executor/prebuilder.rb', line 7 def initialize() super() @cache_branch = [:cache_branch] @push_cache = [:push_cache] @fetcher = PodPrebuild::CacheFetcher.new() @pusher = PodPrebuild::CachePusher.new() end |
Instance Method Details
#run ⇒ Object
15 16 17 18 19 20 21 22 23 |
# File 'lib/command/executor/prebuilder.rb', line 15 def run @fetcher.run prebuild changes = PodPrebuild::JSONFile.new(@config.delta_file_path) return if changes.empty? sync_cache(changes) @pusher.run if @push_cache end |