public Method

Hash.except(*rejected)

Returns a new hash without the selected keys:

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

Source Code

# File merb/core_ext/hash.rb, line 126
def except(*rejected) 
  reject { |k,v| rejected.include?(k) }
end
Comments

Have your say
Please use Textile formatting (click here for a cheat sheet). Use <code/> and <pre/> for code samples.
Click here to login with OpenID to to post comments.