According to https://bugs.gentoo.org/475624 there were discussions around creating a dev-ruby/notmuch-ruby package, but I cannot find it in the current Gentoo tree. I am not sure if a separate package would be the way to go, or if the net-mail/notmuch ebuild should be modified. The latter already supports Python bindings, so adding Ruby bindings support there seems more natural to me. The reason for me asking is that there is a fresh release of the notmuch-vim plugin available, and I have started a pull request for a new package (see https://github.com/gentoo/gentoo/pull/21559). This plugin requires Ruby bindings.
I would say if it's possible to make bindings a separate ebuild - take that route. current ebuild is complicated enough already, no need to add more.
Created attachment 754306 [details] ebuild with ruby bindings A simple ebuild modification to both bump the version to 0.34.1 and add ruby bindings support via use flag. I just used notmuch's makefile, so there were only a handful of lines needed, but it's my first time working on an ebuild, so there may be mistakes (I've only tested it on my machine, where it does successfully add notmuch ruby bindings, but that's about all I can say about it).
sorry but this is not correct way of installing ruby modules in gentoo. it only installs for single ruby version.