1# frozen_string_literal: true
2
3module Gitlab
4  module WebIde
5    class Config
6      module Entry
7        ##
8        # This class represents a global entry - root Entry for entire
9        # GitLab WebIde Configuration file.
10        #
11        class Global < ::Gitlab::Config::Entry::Node
12          include ::Gitlab::Config::Entry::Configurable
13          include ::Gitlab::Config::Entry::Attributable
14
15          def self.allowed_keys
16            %i[terminal].freeze
17          end
18
19          validations do
20            validates :config, allowed_keys: Global.allowed_keys
21          end
22
23          attributes allowed_keys
24
25          entry :terminal, Entry::Terminal,
26            description: 'Configuration of the webide terminal.'
27        end
28      end
29    end
30  end
31end
32
33::Gitlab::WebIde::Config::Entry::Global.prepend_mod_with('Gitlab::WebIde::Config::Entry::Global')
34