The class of the renderer object for the base class.
Example:
>> Ruport::Data::Table.renderer => Ruport::Renderer::Table
# File lib/ruport/renderer.rb, line 144 def renderer return unless @renderer @renderer.split("::").inject(Class) { |c,el| c.const_get(el) } end
The default rendering options for a class, stored as a hash.
# File lib/ruport/renderer.rb, line 110 def rendering_options @rendering_options end
Shortcut for renders_with(Ruport::Renderer::Group), you may wish to override this if you build a custom group renderer.
# File lib/ruport/renderer.rb, line 128 def renders_as_group(options={}) renders_with Ruport::Renderer::Group,options end
Shortcut for renders_with(Ruport::Renderer::Grouping), you may wish to override this if you build a custom grouping renderer.
# File lib/ruport/renderer.rb, line 134 def renders_as_grouping(options={}) renders_with Ruport::Renderer::Grouping,options end
Shortcut for renders_with(Ruport::Renderer::Row), you may wish to override this if you build a custom row renderer.
# File lib/ruport/renderer.rb, line 122 def renders_as_row(options={}) renders_with Ruport::Renderer::Row, options end
Shortcut for renders_with(Ruport::Renderer::Table), you may wish to override this if you build a custom table renderer.
# File lib/ruport/renderer.rb, line 116 def renders_as_table(options={}) renders_with Ruport::Renderer::Table,options end
Tells the class which renderer as() will forward to.
Usage:
class MyStructure include Renderer::Hooks renders_with CustomRenderer end
You can also specify default rendering options, which will be used if they are not overriden by the options passed to as().
class MyStructure include Renderer::Hooks renders_with CustomRenderer, :font_size => 14 end
# File lib/ruport/renderer.rb, line 104 def renders_with(renderer,opts={}) @renderer = renderer.name @rendering_options=opts end
Generated with the Darkfish Rdoc Generator 2.