Your First Ruby Gem

preview_player
Показать описание

In this episode, we will create our first Ruby Gem. It will be a very simplified gem that adds a method to the built-in Ruby Array class. The goal is to understand the core pieces of what is needed to create a gem that we can share with the community.

IMPORTANT NOTE: If you are planning to build along with the video and publish the gem, you will need to use a different gem name as parity_prop is already published to RubyGems. In such a small gem this is a pretty simple task, simple rename every call to parity_prop within the code/ file structure to the gem name that you have chosen as a replacement. This illustrates a good initial step to take before starting to work on your gem, think of a name for your project and make sure that it is available on RubyGems.
Рекомендации по теме
Комментарии
Автор

kylo ren teaching ruby is absolutely amazing

cherryramatis
Автор

Thanks! It's great that you did not take any shortcuts and built it from scratch! Helps us learn and understand better.

sushispicelatte
Автор

Thanks for this video man! Appreciate it. And.. I do have to say, I loved you in The Last Jedi!

urbnctrl
Автор

Nice!
Could you do one explaining how to use zeitwerk and also adding types (sorbert + tapioca)?

diegolinharesrb
Автор

It is also worth mentioning if you intend to publish this gem to Ruby Gems you should change the name of your gem. If you try to create a gem called parity_prop, you cannot push it to Ruby Gems because there is one that already exists in the Ruby Gems repository.

benkiarie
Автор

Nice documentation pop-up in your irb session. I'm presuming that functionality is a gem itself. What is it, or how can I get the same functionality?

RyanSandridge
Автор

Nice! I personally always use `bundle gem GEMNAME` to create the barebones Gem structure. Many options can be passed:

kieranklaassen
Автор

how terminal show the defination in irb ... I want to know that thing which happened in this video at 11:26 .. please reply on my comment

kgjcitm