Class: Contrast::Config::ConfigurationFiles

Inherits:
Object
  • Object
show all
Defined in:
lib/contrast/config/configuration_files.rb

Overview

This class will hold all the references for the configuration files. It will safe read values used to identify the source of configuration in Configuration Diagnostics reported to TS.

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#main_fileString

Returns path of the main configuration file.

Returns:

  • (String)

    path of the main configuration file.



15
16
17
# File 'lib/contrast/config/configuration_files.rb', line 15

def main_file
  @main_file
end

Instance Method Details

#add_source_file(path, values) ⇒ Object

Parameters:



24
25
26
27
# File 'lib/contrast/config/configuration_files.rb', line 24

def add_source_file path, values
  source_files << Contrast::Config::LocalSourceValue.new(path, values)
  @main_file = path if source_files.length == 1
end

#source_filesArray<Contrast::Config::LocalSourceValue>



18
19
20
# File 'lib/contrast/config/configuration_files.rb', line 18

def source_files
  @_source_files ||= []
end