lib/sugar-high/array.rb in sugar-high-0.4.7 vs lib/sugar-high/array.rb in sugar-high-0.4.8

- old
+ new

@@ -95,9 +95,14 @@ end def extract(sym) map { |e| e.send(sym) } end + + # Repeat overall-used method here, to use it without Rails + def extract_options! + last.is_a?(::Hash) ? pop : {} + end unless defined? Array.new.extract_options! end module MathArray def sum inject( 0 ) { |sum,x| sum + x }