Class: ActiveError::Captor

Inherits:
Object
  • Object
show all
Defined in:
lib/active_error/captor.rb

Instance Method Summary collapse

Constructor Details

#initialize(exception:, request:, capture_instance: true) ⇒ Captor

Returns a new instance of Captor.



13
14
15
16
17
# File 'lib/active_error/captor.rb', line 13

def initialize(exception:, request:, capture_instance: true)
  @exception = exception
  @request = request
  @capture_instance = capture_instance
end

Instance Method Details

#captureObject



19
20
21
22
# File 'lib/active_error/captor.rb', line 19

def capture
  create_instance if capture_instance?
  fault
end