Ruport::Formatter::RenderingTools

Provides shortcuts so that you can use Ruport's default rendering capabilities within your custom formatters

Public Instance Methods

render_data_by_row(options={},&block) click to toggle source

Iterates through data and passes each row to render_row with the given options.

# File lib/ruport/formatter.rb, line 70
def render_data_by_row(options={},&block)
  data.each do |r|
    render_row(r,options,&block)
  end
end
render_group(group,options={},&block) click to toggle source

Uses Renderer::Group to render the Group object with the given options.

Sets the :io attribute by default to the existing formatter's output object.

# File lib/ruport/formatter.rb, line 99
def render_group(group,options={},&block)
  render_helper(Renderer::Group,group,options,&block)
end
render_grouping(grouping,options={},&block) click to toggle source

Uses Renderer::Grouping to render the Grouping object with the given options.

Sets the :io attribute by default to the existing formatter's output object.

# File lib/ruport/formatter.rb, line 108
def render_grouping(grouping,options={},&block)
  render_helper(Renderer::Grouping,grouping,options,&block)
end
render_inline_grouping(options={},&block) click to toggle source

Iterates through the data in the grouping and renders each group followed by a newline.

# File lib/ruport/formatter.rb, line 115
def render_inline_grouping(options={},&block)
  data.each do |_,group|                     
    render_group(group, options, &block)
    output << "\n"
  end
end
render_row(row,options={},&block) click to toggle source

Uses Renderer::Row to render the Row object with the given options.

Sets the :io attribute by default to the existing formatter's output object.

# File lib/ruport/formatter.rb, line 81
def render_row(row,options={},&block)
  render_helper(Renderer::Row,row,options,&block)
end
render_table(table,options={},&block) click to toggle source

Uses Renderer::Table to render the Table object with the given options.

Sets the :io attribute by default to the existing formatter's output object.

# File lib/ruport/formatter.rb, line 90
def render_table(table,options={},&block)
  render_helper(Renderer::Table,table,options,&block)
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.