All threads / Are "nonclass singleton methods as rare as class methods are common"

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?

Join the discussion

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

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

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

    logo Created with Sketch.

    Ruby on Rails tutorials, guides, and screencasts for web developers learning Ruby, Rails, Javascript, Turbolinks, Stimulus.js, Vue.js, and more. Icons by Icons8

    © 2020 GoRails, LLC. All rights reserved.