Ruby convert Object to Hash November 19, 2022 by Tarik Just say (current object) .attributes .attributes returns a hash of any object. And it’s much cleaner too.