Set And Restore Public Attributes Around a Block Using Object#with

We can use Object#with method as shorthand for the common begin/ensure pattern to save the value of an attribute, setting a new value, and then restoring the previous value.

Open Ranges Are Now Supported By The Object#in? Method In Rails

We can use Object#in? method to check open date ranges i.e. beginless and endless ranges.