Class: RailsInformant::Event
- Inherits:
-
Object
- Object
- RailsInformant::Event
- Defined in:
- lib/rails_informant/event.rb
Instance Attribute Summary collapse
-
#controller_action ⇒ Object
readonly
Returns the value of attribute controller_action.
-
#error ⇒ Object
readonly
Returns the value of attribute error.
-
#error_class ⇒ Object
readonly
Returns the value of attribute error_class.
-
#fingerprint ⇒ Object
Returns the value of attribute fingerprint.
-
#job_class ⇒ Object
readonly
Returns the value of attribute job_class.
-
#message ⇒ Object
readonly
Returns the value of attribute message.
-
#request_path ⇒ Object
readonly
Returns the value of attribute request_path.
-
#severity ⇒ Object
Returns the value of attribute severity.
Instance Method Summary collapse
- #halt! ⇒ Object
- #halted? ⇒ Boolean
-
#initialize(error, attributes, env: nil, fingerprint: nil) ⇒ Event
constructor
A new instance of Event.
Constructor Details
#initialize(error, attributes, env: nil, fingerprint: nil) ⇒ Event
Returns a new instance of Event.
6 7 8 9 10 11 12 13 14 15 16 |
# File 'lib/rails_informant/event.rb', line 6 def initialize(error, attributes, env: nil, fingerprint: nil) @error = error @error_class = attributes[:error_class] @message = attributes[:message] @severity = attributes[:severity] @controller_action = attributes[:controller_action] @job_class = attributes[:job_class] @request_path = env&.dig("PATH_INFO") @fingerprint = fingerprint @halted = false end |
Instance Attribute Details
#controller_action ⇒ Object (readonly)
Returns the value of attribute controller_action.
3 4 5 |
# File 'lib/rails_informant/event.rb', line 3 def controller_action @controller_action end |
#error ⇒ Object (readonly)
Returns the value of attribute error.
3 4 5 |
# File 'lib/rails_informant/event.rb', line 3 def error @error end |
#error_class ⇒ Object (readonly)
Returns the value of attribute error_class.
3 4 5 |
# File 'lib/rails_informant/event.rb', line 3 def error_class @error_class end |
#fingerprint ⇒ Object
Returns the value of attribute fingerprint.
4 5 6 |
# File 'lib/rails_informant/event.rb', line 4 def fingerprint @fingerprint end |
#job_class ⇒ Object (readonly)
Returns the value of attribute job_class.
3 4 5 |
# File 'lib/rails_informant/event.rb', line 3 def job_class @job_class end |
#message ⇒ Object (readonly)
Returns the value of attribute message.
3 4 5 |
# File 'lib/rails_informant/event.rb', line 3 def @message end |
#request_path ⇒ Object (readonly)
Returns the value of attribute request_path.
3 4 5 |
# File 'lib/rails_informant/event.rb', line 3 def request_path @request_path end |
#severity ⇒ Object
Returns the value of attribute severity.
4 5 6 |
# File 'lib/rails_informant/event.rb', line 4 def severity @severity end |
Instance Method Details
#halt! ⇒ Object
18 19 20 |
# File 'lib/rails_informant/event.rb', line 18 def halt! @halted = true end |
#halted? ⇒ Boolean
22 23 24 |
# File 'lib/rails_informant/event.rb', line 22 def halted? @halted end |