Class: UpdateApplier

Inherits:
Object
  • Object
show all
Defined in:
action/lib/update_applier.rb

Overview

Applies manifest update records to Package.swift files in the workspace.

Defined Under Namespace

Classes: Result

Instance Method Summary collapse

Constructor Details

#initialize(records, updater: ManifestUpdater) ⇒ UpdateApplier

Returns a new instance of UpdateApplier.



104
105
106
107
# File 'action/lib/update_applier.rb', line 104

def initialize(records, updater: ManifestUpdater)
  @records = Array(records).map { |record| Record.new(record) }
  @updater = updater
end

Instance Method Details

#applyObject



109
110
111
112
# File 'action/lib/update_applier.rb', line 109

def apply
  classified = ClassifiedRecords.new(@records)
  BatchApplier.new(classified.eligible, @updater).result_with(classified.skipped)
end