Technically you could. However unless the gem code is very simple, I would not advise starting with this approach. Which gem did you have in mind ?