What is the difference between class and module?



What is the difference between class and module?..

Answer / Mohit Singh

In Ruby, both classes and modules are used for code organization. However, classes represent objects or instances with methods, while modules only contain methods that can be included in classes to extend their functionality. Classes are used more frequently for defining object-oriented concepts, whereas modules are useful when reusing common functionality across multiple classes.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Cucumber Ruby Interview Questions

What is support, env.rb and hooks.rb?

1 Answers  


What are cucumber tags? Why we use the tags?

1 Answers  


What software do you need to run a cucumber web test?

1 Answers  


What is step definition in cucumber?

1 Answers  


Cucumber is written in which programming language?

1 Answers  


What are before, after, beforestep and afterstep hooks?

1 Answers  


What are steps in cucumber?

1 Answers  


What are the difference between jbehave and cucumber?

1 Answers  


What does a features/ support file contains?

1 Answers  


What is profile in cucumber?

1 Answers  


What are hooks in cucumber?

1 Answers  


Cucumber tests are divided into how many parts?

1 Answers  


Categories
  • Cucumber Selenium Interview Questions Cucumber Selenium (0)
  • Cucumber Ruby Interview Questions Cucumber Ruby (31)
  • Cucumber Interview Questions Cucumber (72)