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.5.27 app/services/workarea/tag_update.rb
workarea-core-3.5.26 app/services/workarea/tag_update.rb
workarea-core-3.4.45 app/services/workarea/tag_update.rb
workarea-core-3.5.25 app/services/workarea/tag_update.rb
workarea-core-3.5.23 app/services/workarea/tag_update.rb
workarea-core-3.4.44 app/services/workarea/tag_update.rb
workarea-core-3.5.22 app/services/workarea/tag_update.rb
workarea-core-3.4.43 app/services/workarea/tag_update.rb
workarea-core-3.5.21 app/services/workarea/tag_update.rb
workarea-core-3.4.42 app/services/workarea/tag_update.rb
workarea-core-3.5.20 app/services/workarea/tag_update.rb
workarea-core-3.4.41 app/services/workarea/tag_update.rb
workarea-core-3.5.19 app/services/workarea/tag_update.rb
workarea-core-3.4.40 app/services/workarea/tag_update.rb
workarea-core-3.5.18 app/services/workarea/tag_update.rb
workarea-core-3.4.39 app/services/workarea/tag_update.rb
workarea-core-3.5.17 app/services/workarea/tag_update.rb
workarea-core-3.4.38 app/services/workarea/tag_update.rb
workarea-core-3.5.16 app/services/workarea/tag_update.rb
workarea-core-3.4.37 app/services/workarea/tag_update.rb