Class: Gitlab::WebIde::Config
- Inherits:
-
Object
- Object
- Gitlab::WebIde::Config
- Defined in:
- lib/gitlab/web_ide/config.rb,
lib/gitlab/web_ide/config/entry/global.rb,
lib/gitlab/web_ide/config/entry/terminal.rb
Overview
Base GitLab WebIde Configuration facade
Defined Under Namespace
Modules: Entry
Constant Summary collapse
- ConfigError =
Class.new(StandardError)
Instance Method Summary collapse
- #errors ⇒ Object
-
#initialize(config, opts = {}) ⇒ Config
constructor
A new instance of Config.
- #schemas_value ⇒ Object
- #terminal_value ⇒ Object
- #to_hash ⇒ Object
- #valid? ⇒ Boolean
Constructor Details
#initialize(config, opts = {}) ⇒ Config
Returns a new instance of Config.
11 12 13 14 15 16 17 18 19 |
# File 'lib/gitlab/web_ide/config.rb', line 11 def initialize(config, opts = {}) @config = build_config(config, opts) @global = Entry::Global.new(@config, with_image_ports: true) @global.compose! rescue Gitlab::Config::Loader::FormatError => e raise Config::ConfigError, e. end |
Instance Method Details
#errors ⇒ Object
25 26 27 |
# File 'lib/gitlab/web_ide/config.rb', line 25 def errors @global.errors end |
#schemas_value ⇒ Object
37 38 39 |
# File 'lib/gitlab/web_ide/config.rb', line 37 def schemas_value @global.schemas_value end |
#terminal_value ⇒ Object
33 34 35 |
# File 'lib/gitlab/web_ide/config.rb', line 33 def terminal_value @global.terminal_value end |
#to_hash ⇒ Object
29 30 31 |
# File 'lib/gitlab/web_ide/config.rb', line 29 def to_hash @config end |
#valid? ⇒ Boolean
21 22 23 |
# File 'lib/gitlab/web_ide/config.rb', line 21 def valid? @global.valid? end |