Class: AwardEmojis::BaseService

Inherits:
BaseService show all
Defined in:
app/services/award_emojis/base_service.rb

Direct Known Subclasses

AddService, DestroyService, ToggleService

Instance Attribute Summary collapse

Attributes inherited from BaseService

#current_user, #params, #project

Instance Method Summary collapse

Methods included from BaseServiceUtility

#deny_visibility_level, #event_service, #log_error, #log_info, #notification_service, #system_hook_service, #todo_service, #visibility_level

Methods included from Gitlab::Allowable

#can?

Constructor Details

#initialize(awardable, name, current_user) ⇒ BaseService

Returns a new instance of BaseService.


7
8
9
10
11
12
# File 'app/services/award_emojis/base_service.rb', line 7

def initialize(awardable, name, current_user)
  @awardable = awardable
  @name = normalize_name(name)

  super(awardable.project, current_user)
end

Instance Attribute Details

#awardableObject

Returns the value of attribute awardable


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

def awardable
  @awardable
end

#nameObject

Returns the value of attribute name


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

def name
  @name
end