Ruby Developer Question:

What is the difference extend and include?

Tweet Share WhatsApp

Answer:

The “include” makes the module’s methods available to the instance of a class, while “extend” makes these methods available to the class itself.

Download Ruby Developer PDF Read All 74 Ruby Developer Questions
Previous QuestionNext Question
Tell me the role of modules and mixins in Ruby?What is the syntax for Ruby collect Iterator?