Hash Slicing
Last updated
Was this helpful?
Last updated
Was this helpful?
Rails' ActiveSupport adds and to the Hash
class. The interface of these two methods seems a little inconsistent though.
The #slice
method returns what is being sliced.
The #slice!
method, on the other hand, returns what is being excluded.