Class: SentryIssueFinder

Inherits:
Object
  • Object
show all
Defined in:
app/finders/sentry_issue_finder.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(project, current_user: nil) ⇒ SentryIssueFinder

Returns a new instance of SentryIssueFinder.



6
7
8
9
# File 'app/finders/sentry_issue_finder.rb', line 6

def initialize(project, current_user: nil)
  @project = project
  @current_user = current_user
end

Instance Attribute Details

#current_userObject

Returns the value of attribute current_user.



4
5
6
# File 'app/finders/sentry_issue_finder.rb', line 4

def current_user
  @current_user
end

#projectObject

Returns the value of attribute project.



4
5
6
# File 'app/finders/sentry_issue_finder.rb', line 4

def project
  @project
end

Instance Method Details

#execute(identifier) ⇒ Object



11
12
13
14
15
16
# File 'app/finders/sentry_issue_finder.rb', line 11

def execute(identifier)
  return unless authorized?

  SentryIssue
    .for_project_and_identifier(project, identifier)
end