class Datadog::Core::Remote::Configuration::Repository
Repository
def [](path)
def [](path) @contents[path] end
def commit(transaction)
def commit(transaction) previous = contents.dup touched = transaction.operations.each_with_object([]) do |op, acc| acc << op.apply(self) end changes = ChangeSet.new touched.uniq.each do |path| next if path.nil? changes.add(path, previous[path], @contents[path]) end changes.freeze end
def initialize
def initialize @contents = ContentList.new @opaque_backend_state = nil @root_version = UNVERIFIED_ROOT_VERSION @targets_version = INITIAL_TARGETS_VERSION end
def paths
def paths @contents.paths end
def state
def state State.new(self) end
def transaction
def transaction transaction = Transaction.new yield(self, transaction) commit(transaction) end