Skip to main content

Watch: Singleton Methods in Ruby

By Ilya Bodrov-Krukowski

Ruby

Share:

Free JavaScript Book!

Write powerful, clean and maintainable JavaScript.

RRP $11.95

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 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.

New books out now!

Learn how Git works, and how to use it to streamline your workflow!


Google, Netflix and ILM are Python users. Maybe you should too?