Answer Posted / Nalinaksh Punj Gautam
In Ruby, include adds methods and constants from one module to another as instance methods. Extend adds them as private instance methods. When you use include, it modifies the receiving object directly, while extend creates a new singleton class for the receiver and includes the module into it.
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers