Class: SystemNotes::BaseService

Inherits:
Object
  • Object
show all
Defined in:
app/services/system_notes/base_service.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(container: nil, noteable: nil, author: nil) ⇒ BaseService

Returns a new instance of BaseService.



8
9
10
11
12
13
14
# File 'app/services/system_notes/base_service.rb', line 8

def initialize(container: nil, noteable: nil, author: nil)
  @container = container
  @noteable = noteable
  @author = Gitlab::Auth::Identity.invert_composite_identity(author)

  handle_container_type(container)
end

Instance Attribute Details

#authorObject (readonly)

Returns the value of attribute author.



6
7
8
# File 'app/services/system_notes/base_service.rb', line 6

def author
  @author
end

#containerObject (readonly)

Returns the value of attribute container.



6
7
8
# File 'app/services/system_notes/base_service.rb', line 6

def container
  @container
end

#groupObject

Returns the value of attribute group.



5
6
7
# File 'app/services/system_notes/base_service.rb', line 5

def group
  @group
end

#noteableObject (readonly)

Returns the value of attribute noteable.



6
7
8
# File 'app/services/system_notes/base_service.rb', line 6

def noteable
  @noteable
end

#projectObject

Returns the value of attribute project.



5
6
7
# File 'app/services/system_notes/base_service.rb', line 5

def project
  @project
end