The original purpose of the DecoratorContext was to provide the decorators with an object that could be used as the user_options for getting things like the base URL, resource URL, resource title etc.
Unfortunately, this never panned out, as the Roar::Decorator code calls merge on the user_options object (expecting it, quite reasonably, to be a Hash), and it turns back into a Hash by the time it gets yielded into the decorator blocks.
The original purpose of the DecoratorContext was to provide the decorators with an object that could be used as the
user_options
for getting things like the base URL, resource URL, resource title etc.Unfortunately, this never panned out, as the Roar::Decorator code calls
merge
on the user_options object (expecting it, quite reasonably, to be a Hash), and it turns back into a Hash by the time it gets yielded into the decorator blocks.This PR cleans up and documents that code.