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

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  


what is the Notation used for denoting class variables in Ruby?

1 Answers  


Tell me how you can list all routes for an application?

1 Answers  


Do you know when self.up and self.down method is used?

1 Answers  


What are the object-oriented programming features supported by ruby?

1 Answers  


How many types of associations relationships does a model has?

1 Answers  


List some features of ruby?

1 Answers  


Explain about class libraries in ruby?

1 Answers  


How will you rename and delete a file in Ruby?

1 Answers  


Tell me what does ruby name refers to?

1 Answers  


Explain about operators in Ruby?

1 Answers  


Categories