Class: ActiveSupport::ErrorReporter::TestHelper::ErrorSubscriber

Inherits:
Object
  • Object
show all
Defined in:
activesupport/lib/active_support/error_reporter/test_helper.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeErrorSubscriber

Returns a new instance of ErrorSubscriber.



7
8
9
# File 'activesupport/lib/active_support/error_reporter/test_helper.rb', line 7

def initialize
  @events = []
end

Instance Attribute Details

#eventsObject (readonly)

Returns the value of attribute events



5
6
7
# File 'activesupport/lib/active_support/error_reporter/test_helper.rb', line 5

def events
  @events
end

Instance Method Details

#report(error, handled:, severity:, source:, context:) ⇒ Object



11
12
13
# File 'activesupport/lib/active_support/error_reporter/test_helper.rb', line 11

def report(error, handled:, severity:, source:, context:)
  @events << [error, handled, severity, source, context]
end