Sha256: edb32c593917103c5a8bb0461682dfd66e37ee62651c4c2f8cb0c67976a01d08

Contents?: true

Size: 310 Bytes

Versions: 59

Compression:

Stored size: 310 Bytes

Contents

require 'set'

module Bullet
  class NotificationCollector
    attr_reader :collection

    def initialize
      reset
    end

    def reset
      @collection = Set.new
    end

    def add(value)
      @collection << value
    end

    def notifications_present?
      !@collection.empty?
    end
  end
end

Version data entries

59 entries across 59 versions & 2 rubygems

Version Path
bullet-5.7.0 lib/bullet/notification_collector.rb
bullet-5.6.1 lib/bullet/notification_collector.rb
bullet-5.6.0 lib/bullet/notification_collector.rb
bullet-5.5.1 lib/bullet/notification_collector.rb
bullet-5.5.0 lib/bullet/notification_collector.rb
bullet-5.4.3 lib/bullet/notification_collector.rb
bullet-5.4.2 lib/bullet/notification_collector.rb
bullet-5.4.1 lib/bullet/notification_collector.rb
bullet-5.4.0 lib/bullet/notification_collector.rb
bullet-5.3.0 lib/bullet/notification_collector.rb
bullet-5.2.1 lib/bullet/notification_collector.rb
bullet-5.2.0 lib/bullet/notification_collector.rb
bullet-5.1.1 lib/bullet/notification_collector.rb
bullet-5.1.0 lib/bullet/notification_collector.rb
bullet-5.0.0 lib/bullet/notification_collector.rb
bullet-4.14.10 lib/bullet/notification_collector.rb
bullet-4.14.9 lib/bullet/notification_collector.rb
bullet-4.14.8 lib/bullet/notification_collector.rb
bullet_instructure-4.14.8 lib/bullet/notification_collector.rb
bullet-4.14.7 lib/bullet/notification_collector.rb