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



7
8
9
# File 'lib/tdc/yaml_readers/yaml_reader_with_expansion.rb', line 7

def file_extension
  ".yml.erb"
end

#source_stringObject



11
12
13
# File 'lib/tdc/yaml_readers/yaml_reader_with_expansion.rb', line 11

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