Class: Array

Inherits:
Object
  • Object
show all
Defined in:
lib/sidekiq_unique_jobs/core_ext.rb

Overview

Monkey patches for the ruby Array

Instance Method Summary collapse

Instance Method Details

#extract_options!Hash

Extract the last argument if it is a hash

Returns:



124
125
126
127
128
129
130
# File 'lib/sidekiq_unique_jobs/core_ext.rb', line 124

def extract_options!
  if last.is_a?(Hash) && last.instance_of?(Hash)
    pop
  else
    {}
  end
end