Class: GDK::ConfigExample

Inherits:
Config show all
Includes:
Stubbed
Defined in:
lib/gdk/config_example.rb

Overview

Config subclass to generate gdk.example.yml

Defined Under Namespace

Modules: Stubbed Classes: Settings

Constant Summary collapse

GDK_ROOT =
'/home/git/gdk'

Constants inherited from Config

GDK::Config::FILE

Constants inherited from ConfigSettings

GDK::ConfigSettings::LooseFile, GDK::ConfigSettings::SettingUndefined, GDK::ConfigSettings::UnsupportedConfiguration, GDK::ConfigSettings::YamlModified

Instance Attribute Summary

Attributes inherited from ConfigSettings

#key, #parent, #yaml

Instance Method Summary collapse

Methods included from Stubbed

#find_executable!, #rand, #settings_klass

Methods inherited from Config

#gdk_root

Methods inherited from ConfigSettings

#[], anything, array, bool, #bury!, #bury_multiple!, #config_file_protected?, #dig, #dump!, #dump_as_yaml, #fetch, #find_executable!, hash_setting, #inspect, integer, load_from_file, #method_missing, path, port, #port_manager, #read!, #respond_to_missing?, #root, settings, settings_array, #settings_klass, #slug, string, #to_s, #user_defined?, #validate!

Constructor Details

#initializeConfigExample

Returns a new instance of ConfigExample.



37
38
39
40
41
42
43
44
45
46
47
48
49
# File 'lib/gdk/config_example.rb', line 37

def initialize
  # Override some settings which would otherwise be auto-detected
  yaml = {
    'username' => 'git',
    'git_repositories' => [],
    'restrict_cpu_count' => -1,
    'postgresql' => {
      'bin_dir' => '/usr/local/bin'
    }
  }

  super(yaml: yaml)
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class GDK::ConfigSettings