Ruby
Article

Watch: Singleton Methods in Ruby

By Ilya Bodrov-Krukowski

Ruby Metaprogramming Revealed

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…

No Reader comments

Recommended

Learn Coding Online
Learn Web Development

Start learning web development and design for free with SitePoint Premium!

Get the latest in Ruby, once a week, for free.