Class: Taeval::ConfigManager

Inherits:
Object
  • Object
show all
Extended by:
FileHelper
Defined in:
lib/taeval/config_manager.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Methods included from FileHelper

create, exist?, flatten_include!, open, path_of

Instance Attribute Details

#configObject (readonly)

Returns the value of attribute config.



11
12
13
# File 'lib/taeval/config_manager.rb', line 11

def config
  @config
end

#outputObject (readonly)

Returns the value of attribute output.



11
12
13
# File 'lib/taeval/config_manager.rb', line 11

def output
  @output
end

#reporterObject (readonly)

Returns the value of attribute reporter.



11
12
13
# File 'lib/taeval/config_manager.rb', line 11

def reporter
  @reporter
end

Class Method Details

.create(config_file) ⇒ Object



15
16
17
18
19
20
# File 'lib/taeval/config_manager.rb', line 15

def create(config_file)
  path = path_of(config_file) 
  conf = YAML.load(File.read(path))
  flatten_include!(conf)
  ConfigManager.new(conf, Output.new(conf), Reporter.new(conf))
end