Sha256: 22de3b1240b0929bc37244cdddefeefe50056a017f00437d20c44b528071c108

Contents?: true

Size: 283 Bytes

Versions: 62

Compression:

Stored size: 283 Bytes

Contents

module Workarea
  class TagUpdate
    attr_accessor :removes, :adds

    def initialize(adds: [], removes: [])
      @adds = adds
      @removes = removes
    end

    def apply(tags)
      tags.reject! { |tag| removes.include?(tag) }
      tags.concat(adds).uniq!
    end
  end
end

Version data entries

62 entries across 62 versions & 1 rubygems

Version Path
workarea-core-3.4.13 app/services/workarea/tag_update.rb
workarea-core-3.4.12 app/services/workarea/tag_update.rb