Class: Tdc::DataDefinitionFileReader
- Inherits:
-
DataDefinition
- Object
- DataDefinition
- Tdc::DataDefinitionFileReader
- Defined in:
- lib/tdc/data_definition_file_reader.rb
Overview
Knows how to read data definitions from YAML files.
Constant Summary collapse
- EMPTY_DEFINITIONS =
[]
Instance Attribute Summary collapse
-
#catalog_root_directory ⇒ Object
readonly
Returns the value of attribute catalog_root_directory.
Instance Method Summary collapse
-
#initialize(catalog_root_directory) ⇒ DataDefinitionFileReader
constructor
A new instance of DataDefinitionFileReader.
- #read(*path_elements) ⇒ Object
Methods inherited from DataDefinition
Constructor Details
#initialize(catalog_root_directory) ⇒ DataDefinitionFileReader
Returns a new instance of DataDefinitionFileReader.
10 11 12 |
# File 'lib/tdc/data_definition_file_reader.rb', line 10 def initialize(catalog_root_directory) @catalog_root_directory = catalog_root_directory end |
Instance Attribute Details
#catalog_root_directory ⇒ Object (readonly)
Returns the value of attribute catalog_root_directory.
8 9 10 |
# File 'lib/tdc/data_definition_file_reader.rb', line 8 def catalog_root_directory @catalog_root_directory end |
Instance Method Details
#read(*path_elements) ⇒ Object
14 15 16 17 18 |
# File 'lib/tdc/data_definition_file_reader.rb', line 14 def read(*path_elements) reader = Tdc::YamlReaders::YamlReaderFactory.new(@catalog_root_directory, path_elements).create reader.data_definitions end |