Hash Slicing
Rails' ActiveSupport adds #slice
and #slice!
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.
Last updated