Class: Array

Inherits:
Object show all
Defined in:
lib/stub_requests/core_ext/object/blank.rb,
lib/stub_requests/core_ext/array/extract_options.rb

Overview

:nodoc:

Instance Method Summary collapse

Instance Method Details

#extract_optionsObject

:nodoc:



23
24
25
26
27
28
29
# File 'lib/stub_requests/core_ext/array/extract_options.rb', line 23

def extract_options
  if last.is_a?(Hash) && last.extractable_options?
    last
  else
    {}
  end
end

#extract_options!Object

:nodoc:



14
15
16
17
18
19
20
# File 'lib/stub_requests/core_ext/array/extract_options.rb', line 14

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