Watch: Singleton Methods in Ruby

Share this article

Did you know that in Ruby you can define personal method for objects? That is, a method that only one object will respond to. Such methods are called Singleton methods and it is worth knowing how to work with them. In this video we are going to discuss callbacks to observe method changes as well as differences between removing and undefining methods. The next mystery of Ruby is going to be revealed!

This is the third video of the Ruby Metaprogramming Revealed series.

Loading the player…

Ilya Bodrov-KrukowskiIlya Bodrov-Krukowski
View Author

Ilya Bodrov is personal IT teacher, a senior engineer working at Campaigner LLC, author and teaching assistant at Sitepoint and lecturer at Moscow Aviations Institute. His primary programming languages are Ruby (with Rails) and JavaScript. He enjoys coding, teaching people and learning new things. Ilya also has some Cisco and Microsoft certificates and was working as a tutor in an educational center for a couple of years. In his free time he tweets, writes posts for his website, participates in OpenSource projects, goes in for sports and plays music.

angelamInstructional videorubysingletonSitepoint Premium
Share this article
Read Next
Get the freshest news and resources for developers, designers and digital creators in your inbox each week