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.



112
113
114
# File 'lib/datadog/core/remote/configuration/repository.rb', line 112

def initialize
  @operations = []
end

Instance Attribute Details

#operationsObject (readonly)

Returns the value of attribute operations.



110
111
112
# File 'lib/datadog/core/remote/configuration/repository.rb', line 110

def operations
  @operations
end

Instance Method Details

#delete(path) ⇒ Object



116
117
118
# File 'lib/datadog/core/remote/configuration/repository.rb', line 116

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

#insert(path, target, content) ⇒ Object



120
121
122
# File 'lib/datadog/core/remote/configuration/repository.rb', line 120

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

#set(**options) ⇒ Object



128
129
130
# File 'lib/datadog/core/remote/configuration/repository.rb', line 128

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

#update(path, target, content) ⇒ Object



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

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