Class: Textus::Handlers::Write::DeleteKey
- Inherits:
-
Object
- Object
- Textus::Handlers::Write::DeleteKey
- Defined in:
- lib/textus/handlers/write/delete_key.rb
Instance Method Summary collapse
- #call(command, call) ⇒ Object
-
#initialize(container:) ⇒ DeleteKey
constructor
A new instance of DeleteKey.
Constructor Details
#initialize(container:) ⇒ DeleteKey
Returns a new instance of DeleteKey.
5 6 7 |
# File 'lib/textus/handlers/write/delete_key.rb', line 5 def initialize(container:) @container = container end |
Instance Method Details
#call(command, call) ⇒ Object
9 10 11 12 13 |
# File 'lib/textus/handlers/write/delete_key.rb', line 9 def call(command, call) writer = Store::Entry::Writer.from(container: @container, call: call) writer.delete(command.key, if_etag: command.if_etag) Value::Result.success("protocol" => Textus::PROTOCOL, "ok" => true, "key" => command.key, "deleted" => true) end |