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 a class and a module?



What is the difference between a class and a module?..

Answer / Dharmendra Yadav

In Ruby, both classes and modules are namespaces for organizing code. However, a class is used to define a new data type or object-oriented behavior, whereas a module encapsulates reusable functionality (methods and constants) that can be mixed into existing classes using the `include` or `extend` keywords.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Ruby Interview Questions

Explain about variables?

1 Answers  


What is the difference between a statement and an expression in ruby?

1 Answers  


What is ruby software and where and when it is usefull.

1 Answers  


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

1 Answers  


Explain about portability?

1 Answers  


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

1 Answers  


What's the difference in scope for these two variables: @name and @@name?

1 Answers  


What is mvc and why do we use it?

1 Answers  


Is ruby a strongly typed or a weakly typed language?

1 Answers  


what is Interpolation in Ruby?

1 Answers  


Interpolation is a very important process in Ruby, comment.

1 Answers  


Explain each of the following operators and how and when they should be used: ==, ===, eql?, Equal?

1 Answers  


Categories