Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


What is the difference between extend and include?



What is the difference between extend and include?..

Answer / Vikas Srivastava

In Ruby, "include" allows you to incorporate the methods (and constants) defined in a module into your class or module. On the other hand, "extend" lets you add methods to an existing object without modifying its class.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Ruby Interview Questions

Tell me how can we define ruby regular expressions?

1 Answers  


What is the difference between extend and include?

1 Answers  


How to write multiline string in Ruby?

1 Answers  


In how many ways items can be removed from array in Ruby?

1 Answers  


Can you please explain what is the difference between string and symbol?

1 Answers  


How does a symbol differ from a string?

1 Answers  


How to use ruby methods.

1 Answers  


Explain about interpolation?

1 Answers  


What is the difference between static and dynamic scaffolding?

1 Answers  


Tell me how would you freeze an object in ruby? Can you provide a simple example?

1 Answers  


Interpolation is a very important process in Ruby, comment.

1 Answers  


How would you freeze an object in ruby? Can you provide a simple example?

1 Answers  


Categories