lib/sidekiq_fast_debounce/utils.rb
def extract_opt!(key, args)
        opt = {}

        key_s = key.to_s
        key_sym = key.to_sym

        if args.key?(key_s)
          opt[:value] = args.delete(key_s)
        elsif args.key?(key_sym)
          opt[:value] = args.delete(key_sym)
        end

        opt
      end
# Extract the give key, with indifferent access, from args. Deletes it from args.
# @param key [Symbol] key to extract
# @param args [Hash] last arg from Sidekiq, if
# @return [Hash]
Extract the give key, with indifferent access, from args. Deletes it from args.
Extract the give key with indifferent access from args . Deletes it from args .
def extract_opt!(key, args)
        opt = {}
        key_s = key.to_s
        key_sym = key.to_sym
        if args.key?(key_s)
          opt[:value] = args.delete(key_s)
        elsif args.key?(key_sym)
          opt[:value] = args.delete(key_sym)
        end
        opt
      end
def extract_opt! ( key , args ) opt = { } key_s = key . to_s key_sym = key . to_sym if args . key? ( key_s ) opt [ :value ] = args . delete ( key_s ) elsif args . key? ( key_sym ) opt [ :value ] = args . delete ( key_sym ) end opt end
Extract the give key, with indifferent access, from args.
Extract the give key with indifferent access from args .
None
Hash
key
key to extract
key to extract
args
last arg from Sidekiq, if
last arg from Sidekiq if