Class: ExceptionNotifier::GitlabNotifier
- Inherits:
-
Object
- Object
- ExceptionNotifier::GitlabNotifier
- Defined in:
- lib/gitlab_exception_notification/gitlab_notifier.rb
Instance Method Summary collapse
- #call(exception, options = {}) ⇒ Object
- #exception_notification(env, exception, options = {}) ⇒ Object
-
#initialize(options) ⇒ GitlabNotifier
constructor
A new instance of GitlabNotifier.
Constructor Details
#initialize(options) ⇒ GitlabNotifier
Returns a new instance of GitlabNotifier.
5 6 7 |
# File 'lib/gitlab_exception_notification/gitlab_notifier.rb', line 5 def initialize() = end |
Instance Method Details
#call(exception, options = {}) ⇒ Object
19 20 21 22 |
# File 'lib/gitlab_exception_notification/gitlab_notifier.rb', line 19 def call(exception, ={}) env = [:env] || {} exception_notification(env, exception, .merge()) end |
#exception_notification(env, exception, options = {}) ⇒ Object
10 11 12 13 14 15 16 17 |
# File 'lib/gitlab_exception_notification/gitlab_notifier.rb', line 10 def exception_notification(env, exception, ={}) issue = GitlabExceptionNotification::Issue.new(env, exception, ) if issue_id = issue.exists? issue.update(issue_id) else issue.create end end |