Sha256: c95eb5b071bdba76b2f72782b7a6346826739c2730a0a45c42de04e32fabcb05

Contents?: true

Size: 915 Bytes

Versions: 35

Compression:

Stored size: 915 Bytes

Contents

require 'honeybadger/backend/null'

module Honeybadger
  module Backend
    class Test < Null
      # The notification list.
      #
      # @example
      #   Test.notifications[:notices] # => [Notice, Notice, ...]
      #
      # @return [Hash] Notifications hash.
      def self.notifications
        @notifications ||= Hash.new {|h,k| h[k] = [] }
      end

      # @api public
      # The check in list.
      #
      # @example
      #   Test.check_ins # => ["foobar", "danny", ...]
      #
      # @return [Array<Object>] List of check ins.
      def self.check_ins
        @check_ins ||= []
      end

      def notifications
        self.class.notifications
      end

      def check_ins
        self.class.check_ins
      end

      def notify(feature, payload)
        notifications[feature] << payload
        super
      end

      def check_in(id)
        check_ins << id
      end
    end
  end
end

Version data entries

35 entries across 35 versions & 1 rubygems

Version Path
honeybadger-5.0.1 lib/honeybadger/backend/test.rb
honeybadger-5.0.0 lib/honeybadger/backend/test.rb
honeybadger-5.0.0.beta1 lib/honeybadger/backend/test.rb
honeybadger-4.12.2 lib/honeybadger/backend/test.rb
honeybadger-4.12.1 lib/honeybadger/backend/test.rb
honeybadger-4.12.0 lib/honeybadger/backend/test.rb
honeybadger-4.11.0 lib/honeybadger/backend/test.rb
honeybadger-4.10.0 lib/honeybadger/backend/test.rb
honeybadger-4.9.0 lib/honeybadger/backend/test.rb
honeybadger-4.8.0 lib/honeybadger/backend/test.rb
honeybadger-4.7.3 lib/honeybadger/backend/test.rb
honeybadger-4.7.2 lib/honeybadger/backend/test.rb
honeybadger-4.7.1 lib/honeybadger/backend/test.rb
honeybadger-4.7.0 lib/honeybadger/backend/test.rb
honeybadger-4.6.0 lib/honeybadger/backend/test.rb
honeybadger-4.5.6 lib/honeybadger/backend/test.rb
honeybadger-4.5.5 lib/honeybadger/backend/test.rb
honeybadger-4.5.4 lib/honeybadger/backend/test.rb
honeybadger-4.5.3 lib/honeybadger/backend/test.rb
honeybadger-4.5.2 lib/honeybadger/backend/test.rb