lib/locker/resource.rb in lita-locker-1.0.10 vs lib/locker/resource.rb in lita-locker-1.1.0
- old
+ new
@@ -1,5 +1,7 @@
+# frozen_string_literal: true
+
# Locker subsystem
module Locker
# Resource helpers
module Resource
# Proper Resource class
@@ -32,10 +34,10 @@
r
end
def self.delete(key)
raise 'Unknown resource key' unless Resource.exists?(key)
- %w(state, owner_id).each do |item|
+ %w[state owner_id].each do |item|
redis.del("resource:#{key}:#{item}")
end
redis.srem('resource-list', key)
end