module Enumerable
def without(*elements)
{foo: 1, bar: 2, baz: 3}.without :bar
=> ["David", "Rafael"]
["David", "Rafael", "Aaron", "Todd"].without "Aaron", "Todd"
Returns a copy of the enumerable without the specified elements.
def without(*elements) reject { |element| elements.include?(element) } end