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

What are Ruby arrays and how they can be created?

1 Answers  


What are the ruby variables?

1 Answers  


Tell me an array [1,2,34,5,6,7,8,9], product it using a method?

1 Answers  


Explain when self.up and self.down method is used?

1 Answers  


What are the only two values that are falsy?

1 Answers  


How do you remove nil values in array using ruby?

1 Answers  


Explain redo statement in Ruby?

1 Answers  


Explain about variables?

1 Answers  


Tell us the types of variables available in ruby class?

1 Answers  


Explain about ruby names?

1 Answers  


Can you call a private method outside a ruby class using its object?

1 Answers  


Tell us what is class libraries in ruby?

1 Answers  


Categories