Sha256: ecf51383931ff8f667365961eefec0754e50ced5d6fd2921c8fea966582936ed
Contents?: true
Size: 514 Bytes
Versions: 23
Compression:
Stored size: 514 Bytes
Contents
module Tdc # # Knows how to read data definitions from an in-memory representation. # class InMemoryDataDefinition < Tdc::DataDefinition def initialize(path_elements_data = {}) @store = path_elements_data end def read(*path_elements) @store.fetch(path_elements) do raise Tdc::FatalError, "The path did not have any data associated with it: #{path_elements.inspect}" end end def store(path_elements, data) @store[path_elements] = data end end end
Version data entries
23 entries across 23 versions & 1 rubygems