Class: Datadog::Core::Remote::Configuration::Repository::Operation::Delete
- Inherits:
-
Object
- Object
- Datadog::Core::Remote::Configuration::Repository::Operation::Delete
- Defined in:
- lib/datadog/core/remote/configuration/repository.rb
Overview
Delete contents base on path
Instance Attribute Summary collapse
-
#path ⇒ Object
readonly
Returns the value of attribute path.
Instance Method Summary collapse
- #apply(repository) ⇒ Object
-
#initialize(path) ⇒ Delete
constructor
A new instance of Delete.
Constructor Details
#initialize(path) ⇒ Delete
Returns a new instance of Delete.
153 154 155 156 |
# File 'lib/datadog/core/remote/configuration/repository.rb', line 153 def initialize(path) super() @path = path end |
Instance Attribute Details
#path ⇒ Object (readonly)
Returns the value of attribute path.
151 152 153 |
# File 'lib/datadog/core/remote/configuration/repository.rb', line 151 def path @path end |
Instance Method Details
#apply(repository) ⇒ Object
158 159 160 161 162 163 164 |
# File 'lib/datadog/core/remote/configuration/repository.rb', line 158 def apply(repository) return if repository[@path].nil? repository.contents.delete(@path) @path end |