Class: ResourceEvents::BaseSyntheticNotesBuilderService

Inherits:
Object
  • Object
show all
Includes:
Gitlab::Utils::StrongMemoize
Defined in:
app/services/resource_events/base_synthetic_notes_builder_service.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Gitlab::Utils::StrongMemoize

#clear_memoization, #strong_memoize, #strong_memoized?

Constructor Details

#initialize(resource, current_user, params = {}) ⇒ BaseSyntheticNotesBuilderService

Returns a new instance of BaseSyntheticNotesBuilderService.


14
15
16
17
18
# File 'app/services/resource_events/base_synthetic_notes_builder_service.rb', line 14

def initialize(resource, current_user, params = {})
  @resource = resource
  @current_user = current_user
  @params = params
end

Instance Attribute Details

#current_userObject (readonly)

Returns the value of attribute current_user


12
13
14
# File 'app/services/resource_events/base_synthetic_notes_builder_service.rb', line 12

def current_user
  @current_user
end

#paramsObject (readonly)

Returns the value of attribute params


12
13
14
# File 'app/services/resource_events/base_synthetic_notes_builder_service.rb', line 12

def params
  @params
end

#resourceObject (readonly)

Returns the value of attribute resource


12
13
14
# File 'app/services/resource_events/base_synthetic_notes_builder_service.rb', line 12

def resource
  @resource
end

Instance Method Details

#executeObject


20
21
22
# File 'app/services/resource_events/base_synthetic_notes_builder_service.rb', line 20

def execute
  synthetic_notes
end