Method: Mash#except

Defined in:
lib/extlib/mash.rb

#except(*keys) ⇒ Mash

Returns A new mash without the selected keys.

Examples:

{ :one => 1, :two => 2, :three => 3 }.except(:one)
  #=> { "two" => 2, "three" => 3 }

Parameters:

  • rejected<Array[(String, Symbol)] The mash keys to exclude.

Returns:

  • A new mash without the selected keys.



108
109
110
# File 'lib/extlib/mash.rb', line 108

def except(*keys)
  super(*keys.map {|k| convert_key(k)})
end