Class: Timelogs::BaseService

Inherits:
Object
  • Object
show all
Includes:
BaseServiceUtility, Gitlab::Utils::StrongMemoize
Defined in:
app/services/timelogs/base_service.rb

Direct Known Subclasses

DeleteService

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Gitlab::Utils::StrongMemoize

#clear_memoization, #strong_memoize, #strong_memoized?

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(timelog, user) ⇒ BaseService

Returns a new instance of BaseService.


10
11
12
13
# File 'app/services/timelogs/base_service.rb', line 10

def initialize(timelog, user)
  @timelog = timelog
  @current_user = user
end

Instance Attribute Details

#current_userObject

Returns the value of attribute current_user.


8
9
10
# File 'app/services/timelogs/base_service.rb', line 8

def current_user
  @current_user
end

#timelogObject

Returns the value of attribute timelog.


8
9
10
# File 'app/services/timelogs/base_service.rb', line 8

def timelog
  @timelog
end