Ask A Question

Notifications

You’re not receiving notifications from this thread.

Are "nonclass singleton methods as rare as class methods are common"

TrevorGage asked in General

In his 2011 book "Eloquent Ruby", Russ Olsen makes the states that

"nonclass singleton methods [he refers to instance methods] are as rare as class methods are common."

He makes the point that the most common usage of "instance methods" is the definition of static methods (because this is just adding an instance method to a Class object instance).

And then there is the https://19216801.onl/ https://routerlogin.uno/ https://192168ll.link/ usage of instance methods in RSpec and Mocha in stubs...

Is anyone using instance methods on a regular basis for anything else?

Reply
Join the discussion
Create an account Log in

Want to stay up-to-date with Ruby on Rails?

Join 82,464+ developers who get early access to new tutorials, screencasts, articles, and more.

    We care about the protection of your data. Read our Privacy Policy.