Module: Omnitest::Core::Dash::Loadable

Includes:
Omnitest::Core::DefaultLogger
Defined in:
lib/omnitest/core/hashie.rb

Instance Method Summary collapse

Methods included from Omnitest::Core::DefaultLogger

included

Methods included from Omnitest::Core::DefaultLogger::ClassMethods

#default_logger, #logger

Instance Method Details

#from_yaml(yaml_file) ⇒ Object



37
38
39
40
41
42
43
# File 'lib/omnitest/core/hashie.rb', line 37

def from_yaml(yaml_file)
  logger.debug "Loading #{yaml_file}"
  raw_content = File.read(yaml_file)
  processed_content = ERB.new(raw_content).result
  data = YAML.load processed_content
  new data
end