Sha256: 54668e43f4f2ccbfe4c27cab3dc15d802c22dfcaeea5536d7e6aa123e1eb0ccf
Contents?: true
Size: 680 Bytes
Versions: 13
Compression:
Stored size: 680 Bytes
Contents
# frozen_string_literal: true require "sod" module Milestoner module CLI module Actions module Cache # Handles deleting a user from the cache. class Delete < Sod::Action include Import[:logger, client: :cache] description "Delete user." on %w[-d --delete], argument: "NAME" def call name client.write(:users) { delete name } .either(method(:success), method(:failure)) end private def success(user) = logger.info { "Deleted: #{user.name.inspect}." } def failure(message) = logger.abort message end end end end end
Version data entries
13 entries across 13 versions & 1 rubygems