Class: ActiveRecordPostgresRecovery::RecoveryEvent
- Inherits:
-
Struct
- Object
- Struct
- ActiveRecordPostgresRecovery::RecoveryEvent
- Defined in:
- lib/active_record_postgres_recovery/recovery_event.rb
Instance Attribute Summary collapse
-
#clear_action ⇒ Object
Returns the value of attribute clear_action.
-
#context ⇒ Object
Returns the value of attribute context.
-
#error ⇒ Object
Returns the value of attribute error.
-
#matched_error ⇒ Object
Returns the value of attribute matched_error.
-
#outcome ⇒ Object
Returns the value of attribute outcome.
-
#retrying ⇒ Object
Returns the value of attribute retrying.
-
#source ⇒ Object
Returns the value of attribute source.
Instance Method Summary collapse
Instance Attribute Details
#clear_action ⇒ Object
Returns the value of attribute clear_action
4 5 6 |
# File 'lib/active_record_postgres_recovery/recovery_event.rb', line 4 def clear_action @clear_action end |
#context ⇒ Object
Returns the value of attribute context
4 5 6 |
# File 'lib/active_record_postgres_recovery/recovery_event.rb', line 4 def context @context end |
#error ⇒ Object
Returns the value of attribute error
4 5 6 |
# File 'lib/active_record_postgres_recovery/recovery_event.rb', line 4 def error @error end |
#matched_error ⇒ Object
Returns the value of attribute matched_error
4 5 6 |
# File 'lib/active_record_postgres_recovery/recovery_event.rb', line 4 def matched_error @matched_error end |
#outcome ⇒ Object
Returns the value of attribute outcome
4 5 6 |
# File 'lib/active_record_postgres_recovery/recovery_event.rb', line 4 def outcome @outcome end |
#retrying ⇒ Object
Returns the value of attribute retrying
4 5 6 |
# File 'lib/active_record_postgres_recovery/recovery_event.rb', line 4 def @retrying end |
#source ⇒ Object
Returns the value of attribute source
4 5 6 |
# File 'lib/active_record_postgres_recovery/recovery_event.rb', line 4 def source @source end |
Instance Method Details
#to_h ⇒ Object
14 15 16 17 18 19 20 21 22 23 24 25 26 27 |
# File 'lib/active_record_postgres_recovery/recovery_event.rb', line 14 def to_h { outcome: outcome, source: source, context: context, retrying: , clear_strategy: clear_action[:strategy], clear_performed: clear_action[:performed], cleared_roles: clear_action[:roles], clear_skipped_reason: clear_action[:skipped_reason], matched_error_class: matched_error.class.name, matched_error_message: matched_error..to_s.lines.first.to_s.strip } end |