

Rather than having to write a complicated regular expression, you now have access to an already-written method that will do the work for you. For example, you might use a gem that has existing methods for authenticating user information inside your application. The custom methods inside of gems typically have specific functionalities.
DOTBOT RUBY GEM CODE
Gems just make the process of sharing code that much easier. It’s the best kind of present! If you really wanted to, you could access the code inside a gem file using gem unpack, copy all of the code inside, paste it into your application and the end result would be the same. In short, a gem is a bunch of perfectly packaged Ruby code that gives you access to custom methods somebody else wrote. More From Julia Zolotarev Create React App and TypeScript - A Quick How-To Rather than having to write a complicated regular expression, you now have access to an already-written method that will do the work for you.įor starters, open your terminal and type: gem listĬan it be? That is a very long list of gems that (if you’re anything like me) you didn’t even know existed on your computer. Gems just make the process of sharing code much easier.The custom methods inside of gems typically have specific functionalities.

A gem is a bunch of perfectly packaged Ruby code that gives you access to custom methods somebody else wrote.
