Learning About the Uses of Singleton Methods in Ruby


Part of Screencast Series: Ruby Metaprogramming Revealed


Published September 2015

Callbacks to

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 I’ll also discuss callbacks to observe method changes as well as differences between removed and undefined methods.

SPONSORS
Free Elegant Coding Through Dynamic Methods and "method_missing" 10:19
Free Understanding Eigenclasses in Ruby and Realizing Their Importance 6:45
Learning About the Uses of Singleton Methods in Ruby 9:28
Free Discovering the Differences Between Blocks, Procs and Lambdas 11:50
Free Local Variable Scope in Ruby and How to Get Around It 8:52

Comments

Have your say! or become a member now to take part in the discussion

Loading...
Meet your instructor
Ilya Bodrov-Krukowski

Ilya is a lecturer at MATI-RSTU, senior engineer at Campaigner LLC and seasoned author at SitePoint. When Ilya is not working away on new projects or contributing to open source projects, he's expanding and refining his skills in HTML, CSS, jQuery, Angular, Backbone and Rails. You can read all about his work and development discoveries on his blog Radiant Wind.