Weeks(2).from_now
I don't understand how monkey patching is beneficial beyond personal preference.
I don't understand how monkey patching is beneficial beyond personal preference.
The way Ruby does metaprogramming makes debugging extremely frustrating because your stacktraces will contain references to methods that exist nowhere. Good luck then trying to find where they're defined so you can understand how they work.
I have a very strong opinion that generating methods at runtime is a terrible feature that should be used only when nothing else can be done.
At the top of any file:
def Weeks(arg) end