Class: WorkItems::Widgets::BaseService

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

Constant Summary collapse

WidgetError =
Class.new(StandardError)

Instance Attribute Summary collapse

Attributes inherited from BaseService

#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(widget:, current_user:, service_params: {}) ⇒ BaseService

Returns a new instance of BaseService.



10
11
12
13
14
15
# File 'app/services/work_items/widgets/base_service.rb', line 10

def initialize(widget:, current_user:, service_params: {})
  @widget = widget
  @work_item = widget.work_item
  @current_user = current_user
  @service_params = service_params
end

Instance Attribute Details

#current_userObject (readonly)

Returns the value of attribute current_user.



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

def current_user
  @current_user
end

#service_paramsObject (readonly)

Returns the value of attribute service_params.



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

def service_params
  @service_params
end

#widgetObject (readonly)

Returns the value of attribute widget.



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

def widget
  @widget
end

#work_itemObject (readonly)

Returns the value of attribute work_item.



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

def work_item
  @work_item
end