Sha256: 23392828b7770b7bf8a752918121017d8ec5e3f90dfe7d2717714068497e5bac

Contents?: true

Size: 313 Bytes

Versions: 11

Compression:

Stored size: 313 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

11 entries across 11 versions & 2 rubygems

Version Path
bullet-2.2.1 lib/bullet/notification_collector.rb
bullet-2.2.0 lib/bullet/notification_collector.rb
bullet-2.1.0 lib/bullet/notification_collector.rb
thaold-bullet-2.0.2 lib/bullet/notification_collector.rb
bullet-2.0.1 lib/bullet/notification_collector.rb
bullet-2.0.0 lib/bullet/notification_collector.rb
bullet-2.0.0.rc3 lib/bullet/notification_collector.rb
bullet-2.0.0.rc2 lib/bullet/notification_collector.rb
bullet-2.0.0.rc1 lib/bullet/notification_collector.rb
bullet-2.0.0.beta.4 lib/bullet/notification_collector.rb
bullet-2.0.0.beta.3 lib/bullet/notification_collector.rb