-
Notifications
You must be signed in to change notification settings - Fork 85
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Trove should support more object cleanup methods #149
Conversation
Right now, Trove only supports `Destroy` and `Disconnect` as object cleanup methods. Cleanup methods other than these 2 have to be specified through `Trove:Add`. However, Trove *should* also support camel case versions of these cleanup methods, as developers tend to follow various style guides when writing code. However, the [Roblox Lua Style Guide](https://roblox.github.io/lua-style-guide/) generally states that methods should be generally `camelCase`. For those who follow this (widely-used) style guide, it is inconvenient for them to specify the cleanup method through `Trove:Add`.. This PR makes Trove support the following generic object cleanup methods (which are widely used): - `Destroy` - `Disconnect` - `Cleanup` - `destroy` - `disconnect` - `cleanup`
Overall change looks good, thanks! Please make the changes to satisfy the lint and styling rules, then I'll merge it in. |
|
I'm not sure that Clean and Deinit should be included. It becomes a bit of a slippery slope of what should/shouldn't be added to such a list, e.g. Deconstruct, Remove, Drop, Close, etc. The |
Rectified. |
Pushed, Trove v1.1.0. Thanks @bubshayz! |
Right now, Trove only supports
Destroy
andDisconnect
as object cleanup methods. Cleanup methods other than these 2 have to be specified throughTrove:Add
.However, Trove should also support camel case versions of these cleanup methods, as developers tend to follow various style guides when writing code. However, the Roblox Lua Style Guide generally states that methods should be generally
camelCase
.For those who follow this (widely-used) style guide, it is inconvenient for them to specify the cleanup method through
Trove:Add
..This PR makes Trove support the following *additional generic object cleanup methods:
destroy
disconnect