Module: Goodcheck::Commands::ConfigLoading

Included in:
Check, Test
Defined in:
lib/goodcheck/commands/config_loading.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#configObject (readonly)

Returns the value of attribute config.



4
5
6
# File 'lib/goodcheck/commands/config_loading.rb', line 4

def config
  @config
end

Instance Method Details

#load_config!Object



6
7
8
9
10
# File 'lib/goodcheck/commands/config_loading.rb', line 6

def load_config!
  content = JSON.parse(JSON.dump(YAML.load(config_path.read, config_path.to_s)), symbolize_names: true)
  loader = ConfigLoader.new(path: config_path, content: content)
  @config = loader.load
end