Sha256: 0aced9b3c85e3449314a5950235c80b4de6f7d13caf2f3d1509bff3618728614
Contents?: true
Size: 504 Bytes
Versions: 20
Compression:
Stored size: 504 Bytes
Contents
class GemsToPatchReconciler attr_reader :reconciled_patches def initialize(vulnerable_patches, requested_patches=[]) @vulnerable_patches = vulnerable_patches @requested_patches = requested_patches reconcile end private def reconcile @reconciled_patches = [] unless @requested_patches.empty? @vulnerable_patches.reject! { |gp| !@requested_patches.include?(gp) } @reconciled_patches.push(*((@vulnerable_patches + @requested_patches).uniq)) end end end
Version data entries
20 entries across 20 versions & 1 rubygems