Class: Ide::BaseConfigService

Inherits:
BaseService show all
Defined in:
app/services/ide/base_config_service.rb

Direct Known Subclasses

SchemasConfigService, TerminalConfigService

Constant Summary collapse

ValidationError =
Class.new(StandardError)
WEBIDE_CONFIG_FILE =
'.gitlab/.gitlab-webide.yml'

Instance Attribute Summary collapse

Attributes inherited from BaseService

#current_user, #params, #project

Instance Method Summary collapse

Methods inherited from BaseService

#initialize

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

This class inherits a constructor from BaseService

Instance Attribute Details

#configObject (readonly)

Returns the value of attribute config.



9
10
11
# File 'app/services/ide/base_config_service.rb', line 9

def config
  @config
end

#config_contentObject (readonly)

Returns the value of attribute config_content.



9
10
11
# File 'app/services/ide/base_config_service.rb', line 9

def config_content
  @config_content
end

Instance Method Details

#executeObject



11
12
13
14
15
16
17
# File 'app/services/ide/base_config_service.rb', line 11

def execute
  check_access_and_load_config!

  success
rescue ValidationError => e
  error(e.message)
end