compact!()
Instance Public methods
Replaces current hash with non nil
values.
1 2 3 | hash = { a: true , b: false , c: nil } hash.compact! # => { a: true, b: false} hash # => { a: true, b: false} |
Replaces current hash with non nil
values.
1 2 3 | hash = { a: true , b: false , c: nil } hash.compact! # => { a: true, b: false} hash # => { a: true, b: false} |
Designed by : w10schools
service@w10schools.com
Please login to continue.