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...


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



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

Answer / Shiv Pratap Singh

In Ruby, include adds a module's methods to an existing object as if they were defined locally. The receiver keeps its original identity and methods. Extend, on the other hand, defines the methods as part of the receiver's class, allowing the receiver to inherit any new methods created by the included module.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Ruby Interview Questions

Does hash use “ #==” or “#eql?” To compare hash keys?

1 Answers  


What are differences between ruby and python?

1 Answers  


Explain raise statement in Ruby?

1 Answers  


Please explain what are some advantages of using ruby?

1 Answers  


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

1 Answers  


Tell us the types of variables available in ruby class?

1 Answers  


Explain redo statement in Ruby?

1 Answers  


How symbol is different from variables?

1 Answers  


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

1 Answers  


Explain about the programming language ruby?

1 Answers  


What is Ruby programming language?

1 Answers  


difference between activesupport's “hashwithindifferentaccess” and ruby's “hash”?

1 Answers  


Categories