slice!(*keys)
Instance Public methods
Replaces the hash with only the given keys. Returns a hash containing the removed key/value pairs.
1 2 | { a: 1 , b: 2 , c: 3 , d: 4 }.slice!( :a , :b ) # => {:c=>3, :d=>4} |
Replaces the hash with only the given keys. Returns a hash containing the removed key/value pairs.
1 2 | { a: 1 , b: 2 , c: 3 , d: 4 }.slice!( :a , :b ) # => {:c=>3, :d=>4} |
Designed by : w10schools
service@w10schools.com
Please login to continue.