Sha256: 02c90581f5efdfcd775ddf66f0fea1f3da7c1f29c74a5ba0eb2f7d88e8f7c808
Contents?: true
Size: 529 Bytes
Versions: 9
Compression:
Stored size: 529 Bytes
Contents
module Tdc # # Knows how to read data definitions from an in-memory representation. # class InMemoryDataDefinition < Tdc::DataDefinition def initialize(path_elements_data = {}) super() @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
9 entries across 9 versions & 1 rubygems