adspace


What is a ruby singleton method ?

Answer Posted / Vikas Kumar Tiwari

A singleton method is a class method that can only be called on a specific class (or module) and not on its instances. It's called once for each class it belongs to during the lifetime of that class. In Ruby, you can create a singleton method using the class method 'def self.my_method'

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the current version of ruby on rails?

949