InterviewSolution
Saved Bookmarks
| 1. |
Define What Is The Difference Between Class And Module? |
|
Answer» P141, P142 Class can do: inheritance, having instance, while module CAN NOT. Can be required. Module can do: MAKE NAMESPACE to avoid NAME clash, can be INCLUDED. #instantiate from class within module Module A Class B End b= A::B.new P141, P142 Class can do: inheritance, having instance, while module CAN NOT. Can be required. Module can do: make namespace to avoid name clash, can be included. #instantiate from class within module Module A Class B End b= A::B.new |
|