Class | Radius::Context |
In: |
lib/radius/context.rb
|
Parent: | Object |
A context contains the tag definitions which are available for use in a template. See the QUICKSTART for a detailed explaination its usage.
Returns the state of the current render stack. Useful from inside a tag definition. Normally just use TagBinding#nesting.
Creates a tag definition on a context. Several options are available to you when creating a tag:
for: | Specifies an object that the tag is in reference to. This is applicable when a block is not passed to the tag, or when the expose option is also used. |
expose: | Specifies that child tags should be set for each of the methods contained in this option. May be either a single symbol/string or an array of symbols/strings. |
attributes: | Specifies whether or not attributes should be exposed automatically. Useful for ActiveRecord objects. Boolean. Defaults to true. |
Returns the value of a rendered tag. Used internally by Parser#parse.
Like method_missing for objects, but fired when a tag is undefined. Override in your own Context to change what happens when a tag is undefined. By default this method raises an UndefinedTagError.