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.15 app/services/workarea/tag_update.rb
workarea-core-3.4.36 app/services/workarea/tag_update.rb
workarea-core-3.5.14 app/services/workarea/tag_update.rb
workarea-core-3.4.35 app/services/workarea/tag_update.rb
workarea-core-3.5.13 app/services/workarea/tag_update.rb
workarea-core-3.4.34 app/services/workarea/tag_update.rb
workarea-core-3.5.12 app/services/workarea/tag_update.rb
workarea-core-3.4.33 app/services/workarea/tag_update.rb
workarea-core-3.5.11 app/services/workarea/tag_update.rb
workarea-core-3.5.10 app/services/workarea/tag_update.rb
workarea-core-3.4.32 app/services/workarea/tag_update.rb
workarea-core-3.5.9 app/services/workarea/tag_update.rb
workarea-core-3.4.31 app/services/workarea/tag_update.rb
workarea-core-3.5.8 app/services/workarea/tag_update.rb
workarea-core-3.4.30 app/services/workarea/tag_update.rb
workarea-core-3.5.7 app/services/workarea/tag_update.rb
workarea-core-3.4.29 app/services/workarea/tag_update.rb
workarea-core-3.5.6 app/services/workarea/tag_update.rb
workarea-core-3.4.28 app/services/workarea/tag_update.rb
workarea-core-3.5.5 app/services/workarea/tag_update.rb