Method: QAT::Web::Elements#load_elements_file
- Defined in:
- lib/qat/web/elements.rb
#load_elements_file(file_path) ⇒ Hash
Loads a configuration file
18 19 20 21 22 23 24 25 26 |
# File 'lib/qat/web/elements.rb', line 18 def load_elements_file(file_path) begin config = YAML::load(ERB.new(File.read(file_path)).result) rescue Psych::SyntaxError log.error "Failed to load file '#{file_path}'." raise end config end |