Class: Datadog::Core::Remote::Configuration::Repository::Transaction

Inherits:
Object
  • Object
show all
Defined in:
lib/datadog/core/remote/configuration/repository.rb

Overview

Encapsulates transaction operations

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeTransaction

Returns a new instance of Transaction.



126
127
128
# File 'lib/datadog/core/remote/configuration/repository.rb', line 126

def initialize
  @operations = []
end

Instance Attribute Details

#operationsObject (readonly)

Returns the value of attribute operations.



124
125
126
# File 'lib/datadog/core/remote/configuration/repository.rb', line 124

def operations
  @operations
end

Instance Method Details

#delete(path) ⇒ Object



130
131
132
# File 'lib/datadog/core/remote/configuration/repository.rb', line 130

def delete(path)
  @operations << Operation::Delete.new(path)
end

#insert(path, target, content) ⇒ Object



134
135
136
# File 'lib/datadog/core/remote/configuration/repository.rb', line 134

def insert(path, target, content)
  @operations << Operation::Insert.new(path, target, content)
end

#set(**options) ⇒ Object



142
143
144
# File 'lib/datadog/core/remote/configuration/repository.rb', line 142

def set(**options)
  @operations << Operation::Set.new(**options)
end

#update(path, target, content) ⇒ Object



138
139
140
# File 'lib/datadog/core/remote/configuration/repository.rb', line 138

def update(path, target, content)
  @operations << Operation::Update.new(path, target, content)
end