This class represents the context object that is passed, for example, to
call method of a content processor.
A context object provides information about the render context as well as
access to the website that is rendered. The needed context variables are
stored in the
options hash. You can set any options you like,
however, there are two noteworthy options:
The content string that should be processed. This option is always set.
persistent options hash is shared by all cloned Context objects.
If you want to add custom methods to each context object of your website that is created, you just need to define one or more modules in which your custom methods are defined and then add the modules to the 'website.ext.context_modules' array.
Here is a simple example:
module MyContextMethods def my_method # do something useful here end end website.ext.context_modules << MyContextMethods
The persistent options. Once initialized, all cloned objects refer to the same hash.
The website object to which the render context belongs.
Public Class Methods
Create a new Context object belonging to the
All modules listed in the array 'website.ext.context_modules' are automatically used to extend the Context object.
The following options are set by default and can be overridden via the
Is set to an empty string.
Public Instance Methods
Return the value of the option
Set the option
name to the given +value.
Return the :content option.
Set the :content option to the given