Class: Array

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

Overview

monkey patch Array to gain .extract_options!

Instance Method Summary collapse

Instance Method Details

#extract_options!Object



17
18
19
20
21
22
23
# File 'lib/gadget.rb', line 17

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