Mixin both instance and class methods in Ruby
You're doing it right :) It's a very common idiom, and widely accepted as the preferred way to handle this.

In case you're still in doubt, here are a few examples of the same pattern found in major projects out in the wild: sidekiq, mongoid and datamapper.