Sha256: 120f72ad3d47c789d1b19116935bcb3c7b9194e0e764f8104893ccd98990fbd7

Contents?: true

Size: 313 Bytes

Versions: 2

Compression:

Stored size: 313 Bytes

Contents

require 'set'

module Brakefast
  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

2 entries across 2 versions & 1 rubygems

Version Path
brakefast-0.0.2 lib/brakefast/notification_collector.rb
brakefast-0.0.1 lib/brakefast/notification_collector.rb