Class: Honeybadger::Backend::Test Private

Inherits:
Null
  • Object
show all
Defined in:
lib/honeybadger/backend/test.rb

This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Null

#initialize

Methods inherited from Base

#initialize, #track_deployment

Constructor Details

This class inherits a constructor from Honeybadger::Backend::Null

Class Method Details

.check_insArray<Object>

The check in list.

Examples:

Test.check_ins # => ["foobar", "danny", ...]

Returns:

  • (Array<Object>)

    List of check ins.



33
34
35
# File 'lib/honeybadger/backend/test.rb', line 33

def self.check_ins
  @check_ins ||= []
end

.eventsArray<Hash>

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

The event list.

Examples:

Test.events # => [{}, {}, ...]

Returns:

  • (Array<Hash>)

    List of event payloads.



22
23
24
# File 'lib/honeybadger/backend/test.rb', line 22

def self.events
  @events ||= []
end

.notificationsHash

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

The notification list.

Examples:

Test.notifications[:notices] # => [Notice, Notice, ...]

Returns:

  • (Hash)

    Notifications hash.



12
13
14
# File 'lib/honeybadger/backend/test.rb', line 12

def self.notifications
  @notifications ||= Hash.new {|h,k| h[k] = [] }
end

Instance Method Details

#check_in(id) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



55
56
57
58
# File 'lib/honeybadger/backend/test.rb', line 55

def check_in(id)
  check_ins << id
  super
end

#check_insObject

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



41
42
43
# File 'lib/honeybadger/backend/test.rb', line 41

def check_ins
  self.class.check_ins
end

#event(payload) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



50
51
52
53
# File 'lib/honeybadger/backend/test.rb', line 50

def event(payload)
  events << payload
  super
end

#notificationsObject

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



37
38
39
# File 'lib/honeybadger/backend/test.rb', line 37

def notifications
  self.class.notifications
end

#notify(feature, payload) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



45
46
47
48
# File 'lib/honeybadger/backend/test.rb', line 45

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