Ruby: is it acceptable to put more than one class in a file?

后端 未结 3 1665
野趣味
野趣味 2021-02-13 14:33

This might be a bit of an esoteric question, but I just want to know what best practices are on this issue.

3条回答
  •  情深已故
    2021-02-13 15:01

    Generally it is best practice to keep them in separate files that include the class name in the file name. This keeps your project better oragnized and makes it easier for someone else to navigate your structure.

提交回复
热议问题