Class: WebIde::Config
- Inherits:
-
Object
- Object
- WebIde::Config
- Defined in:
- lib/web_ide/config.rb,
lib/web_ide/config/entry/global.rb,
lib/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.
10 11 12 13 14 15 16 17 18 |
# File 'lib/web_ide/config.rb', line 10 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
24 25 26 |
# File 'lib/web_ide/config.rb', line 24 def errors @global.errors end |
#schemas_value ⇒ Object
36 37 38 |
# File 'lib/web_ide/config.rb', line 36 def schemas_value @global.schemas_value end |
#terminal_value ⇒ Object
32 33 34 |
# File 'lib/web_ide/config.rb', line 32 def terminal_value @global.terminal_value end |
#to_hash ⇒ Object
28 29 30 |
# File 'lib/web_ide/config.rb', line 28 def to_hash @config end |
#valid? ⇒ Boolean
20 21 22 |
# File 'lib/web_ide/config.rb', line 20 def valid? @global.valid? end |