Class: Tdc::YamlReaders::YamlReaderWithExpansion

Inherits:
YamlReaderBase show all
Defined in:
lib/tdc/yaml_readers/yaml_reader_with_expansion.rb

Overview

YAML source is a YAML file that undergoes ERB expansion.

Instance Method Summary collapse

Methods inherited from YamlReaderBase

#applies?, #data_definitions, #definitions_source, #initialize

Constructor Details

This class inherits a constructor from Tdc::YamlReaders::YamlReaderBase

Instance Method Details

#file_extensionObject



9
10
11
# File 'lib/tdc/yaml_readers/yaml_reader_with_expansion.rb', line 9

def file_extension
  ".yml.erb"
end

#source_stringObject



13
14
15
# File 'lib/tdc/yaml_readers/yaml_reader_with_expansion.rb', line 13

def source_string
  ERB.new(File.read(definitions_file)).result
end