I think the "init_with" hook-method should be called "decode_with" so that it is symmetric with the "encode_with" method.
In addition, putting psych in the hook-method names would be helpful:
This ought to reduce method-name collisions as well. Cheers.
I'm keeping it encode_with and init_with. Also, the methods are not supposed to be specific with psych, so adding "psych" to the method names is not helpful.
Okay, adding "psych" to the method names is not necessary.
However, encode_with and init_with seem like an odd pair. Encode & decode are a more natural pair IMHO, like load & dump, serialize & deserialize, pack & unpack, deflate & inflate, mux & demux, and so on.