The class of the controller object for the base class.
Example:
>> Ruport::Data::Table.controller => Ruport::Controller::Table
# File lib/ruport/controller.rb, line 149 def controller @controller end
The default rendering options for a class, stored as a hash.
# File lib/ruport/controller.rb, line 115 def rendering_options @rendering_options end
Shortcut for renders_with(Ruport::Controller::Group), you may wish to override this if you build a custom group controller.
# File lib/ruport/controller.rb, line 133 def renders_as_group(options={}) renders_with Ruport::Controller::Group,options end
Shortcut for renders_with(Ruport::Controller::Grouping), you may wish to override this if you build a custom grouping controller.
# File lib/ruport/controller.rb, line 139 def renders_as_grouping(options={}) renders_with Ruport::Controller::Grouping,options end
Shortcut for renders_with(Ruport::Controller::Row), you may wish to override this if you build a custom row controller.
# File lib/ruport/controller.rb, line 127 def renders_as_row(options={}) renders_with Ruport::Controller::Row, options end
Shortcut for renders_with(Ruport::Controller::Table), you may wish to override this if you build a custom table controller.
# File lib/ruport/controller.rb, line 121 def renders_as_table(options={}) renders_with Ruport::Controller::Table,options end
Tells the class which controller as() will forward to.
Usage:
class MyStructure include Controller::Hooks renders_with CustomController 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 Controller::Hooks renders_with CustomController, :font_size => 14 end
# File lib/ruport/controller.rb, line 109 def renders_with(controller,opts={}) @controller = controller @rendering_options=opts end
Generated with the Darkfish Rdoc Generator 2.