Class: Bugno::Handler
- Inherits:
-
Object
- Object
- Bugno::Handler
- Defined in:
- lib/bugno/handler.rb
Instance Attribute Summary collapse
-
#env ⇒ Object
readonly
Returns the value of attribute env.
-
#event ⇒ Object
readonly
Returns the value of attribute event.
-
#exception ⇒ Object
readonly
Returns the value of attribute exception.
-
#job ⇒ Object
readonly
Returns the value of attribute job.
-
#reporter ⇒ Object
readonly
Returns the value of attribute reporter.
Class Method Summary collapse
Instance Method Summary collapse
- #handle_exception ⇒ Object
-
#initialize(options = {}) ⇒ Handler
constructor
A new instance of Handler.
Constructor Details
Instance Attribute Details
#env ⇒ Object (readonly)
Returns the value of attribute env.
8 9 10 |
# File 'lib/bugno/handler.rb', line 8 def env @env end |
#event ⇒ Object (readonly)
Returns the value of attribute event.
8 9 10 |
# File 'lib/bugno/handler.rb', line 8 def event @event end |
#exception ⇒ Object (readonly)
Returns the value of attribute exception.
8 9 10 |
# File 'lib/bugno/handler.rb', line 8 def exception @exception end |
#job ⇒ Object (readonly)
Returns the value of attribute job.
8 9 10 |
# File 'lib/bugno/handler.rb', line 8 def job @job end |
#reporter ⇒ Object (readonly)
Returns the value of attribute reporter.
8 9 10 |
# File 'lib/bugno/handler.rb', line 8 def reporter @reporter end |
Class Method Details
.call(options = {}) ⇒ Object
16 17 18 |
# File 'lib/bugno/handler.rb', line 16 def self.call( = {}) self.new().handle_exception end |
Instance Method Details
#handle_exception ⇒ Object
20 21 22 23 24 25 |
# File 'lib/bugno/handler.rb', line 20 def handle_exception return if excluded_exception? || !usage_environment? @reporter.request.body = @event.data.to_json Bugno.configuration.send_in_background ? Thread.new { @reporter.send } : @reporter.send end |