Sha256: 392fc9fadf3c41bdbaed3187faed7be379ba245579c32172df1a35654eff2115

Contents?: true

Size: 346 Bytes

Versions: 4

Compression:

Stored size: 346 Bytes

Contents

module LockfilePreserver
  class Pipeline
    def initialize(preservers)
      @preservers = preservers
    end

    def call(original, updated)
      result = updated

      preservers.each do |preserver|
        result = preserver.new(original, result).keep
      end

      result
    end

    private

      attr_reader :preservers
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
lockfile_preserver-1.0.4 lib/lockfile_preserver/pipeline.rb
lockfile_preserver-1.0.3 lib/lockfile_preserver/pipeline.rb
lockfile_preserver-1.0.2 lib/lockfile_preserver/pipeline.rb
lockfile_preserver-1.0.1 lib/lockfile_preserver/pipeline.rb