svoop ✊<p>Here's a <a href="https://ruby.social/tags/Ruby" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>Ruby</span></a> <a href="https://ruby.social/tags/design" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>design</span></a> <a href="https://ruby.social/tags/question" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>question</span></a> that regularly pops up in various contexts such as this: The Mailjet gem is a REST API adapter, 99% generated code. It exposes things as <a href="https://ruby.social/tags/class" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>class</span></a> <a href="https://ruby.social/tags/methods" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>methods</span></a> like `Mailjet::Contact.create`. For a simpler, more consistent interface, I'm wrapping these in my own <a href="https://ruby.social/tags/PORO" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>PORO</span></a> service class, all class methods as well, but I don't like this orgy of `class << self`. How to better design this? Here's a gist with the method bodies removed for readability: <a href="https://gist.github.com/svoop/25accb41d09a667e54c98b6f04a21fdd" rel="nofollow noopener noreferrer" translate="no" target="_blank"><span class="invisible">https://</span><span class="ellipsis">gist.github.com/svoop/25accb41</span><span class="invisible">d09a667e54c98b6f04a21fdd</span></a></p>