Changeset 1287
- Timestamp:
- 03/16/08 19:48:31 (8 months ago)
- Files:
-
- ruport/trunk/lib/ruport/data/grouping.rb (modified) (2 diffs)
- ruport/trunk/lib/ruport/data/record.rb (modified) (1 diff)
- ruport/trunk/lib/ruport/data/table.rb (modified) (1 diff)
- ruport/trunk/lib/ruport/formatter.rb (modified) (13 diffs)
- ruport/trunk/lib/ruport/formatter/csv.rb (modified) (5 diffs)
- ruport/trunk/lib/ruport/formatter/html.rb (modified) (5 diffs)
- ruport/trunk/lib/ruport/formatter/pdf.rb (modified) (4 diffs)
- ruport/trunk/lib/ruport/formatter/template.rb (modified) (1 diff)
- ruport/trunk/lib/ruport/formatter/text.rb (modified) (4 diffs)
- ruport/trunk/lib/ruport/renderer.rb (modified) (26 diffs)
- ruport/trunk/lib/ruport/renderer/grouping.rb (modified) (5 diffs)
- ruport/trunk/lib/ruport/renderer/table.rb (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
ruport/trunk/lib/ruport/data/grouping.rb
r1221 r1287 45 45 end 46 46 47 include Ruport:: Renderer::Hooks47 include Ruport::Controller::Hooks 48 48 renders_as_group 49 49 … … 341 341 alias_method :sum, :sigma 342 342 343 include Ruport:: Renderer::Hooks343 include Ruport::Controller::Hooks 344 344 renders_as_grouping 345 345 ruport/trunk/lib/ruport/data/record.rb
r1283 r1287 234 234 ####################### 235 235 236 include Ruport:: Renderer::Hooks236 include Ruport::Controller::Hooks 237 237 renders_as_row 238 238 ruport/trunk/lib/ruport/data/table.rb
r1257 r1287 235 235 extend FromCSV 236 236 237 include Ruport:: Renderer::Hooks237 include Ruport::Controller::Hooks 238 238 renders_as_table 239 239 ruport/trunk/lib/ruport/formatter.rb
r1281 r1287 12 12 # 13 13 # Typically, a Formatter will implement one or more output types, 14 # and be registered with one or more Renderer classes.14 # and be registered with one or more Controller classes. 15 15 # 16 16 # This class provides all the necessary base functionality to make … … 21 21 # work, but see the built in formatters for reference implementations. 22 22 # 23 # A simple Renderer definition is included to help show the example in23 # A simple Controller definition is included to help show the example in 24 24 # context, but you can also build your own custom interface to formatter 25 25 # if you wish. 26 26 # 27 # class Reverse Renderer < Ruport::Renderer27 # class ReverseController < Ruport::Controller 28 28 # stage :reversed_header, :reversed_body 29 29 # end … … 31 31 # class ReversedText < Ruport::Formatter 32 32 # 33 # # Hooks formatter up to renderer34 # renders :txt, :for => Reverse Renderer33 # # Hooks formatter up to controller 34 # renders :txt, :for => ReverseController 35 35 # 36 # # Implements Reverse Renderer's :reversed_header hook37 # # but can be used by any renderer36 # # Implements ReverseController's :reversed_header hook 37 # # but can be used by any controller 38 38 # def build_reversed_header 39 39 # output << "#{options.header_text}\n" … … 41 41 # end 42 42 # 43 # # Implements Reverse Renderer's :reversed_body hook44 # # but can be used by any renderer43 # # Implements ReverseController's :reversed_body hook 44 # # but can be used by any controller 45 45 # def build_reversed_body 46 46 # output << data.reverse << "\n" … … 49 49 # end 50 50 # 51 # puts Reverse Renderer.render_txt(:data => "apple",51 # puts ReverseController.render_txt(:data => "apple", 52 52 # :header_text => "Hello Mike, Hello Joe!") 53 53 # … … 65 65 # 66 66 module RenderingTools 67 # Uses Renderer::Row to render the Row object with the67 # Uses Controller::Row to render the Row object with the 68 68 # given options. 69 69 # … … 71 71 # formatter's <tt>output</tt> object. 72 72 def render_row(row,options={},&block) 73 render_helper( Renderer::Row,row,options,&block)74 end 75 76 # Uses Renderer::Table to render the Table object with the73 render_helper(Controller::Row,row,options,&block) 74 end 75 76 # Uses Controller::Table to render the Table object with the 77 77 # given options. 78 78 # … … 80 80 # output object. 81 81 def render_table(table,options={},&block) 82 render_helper( Renderer::Table,table,options,&block)83 end 84 85 # Uses Renderer::Group to render the Group object with the82 render_helper(Controller::Table,table,options,&block) 83 end 84 85 # Uses Controller::Group to render the Group object with the 86 86 # given options. 87 87 # … … 89 89 # output object. 90 90 def render_group(group,options={},&block) 91 render_helper( Renderer::Group,group,options,&block)92 end 93 94 # Uses Renderer::Grouping to render the Grouping object with the91 render_helper(Controller::Group,group,options,&block) 92 end 93 94 # Uses Controller::Grouping to render the Grouping object with the 95 95 # given options. 96 96 # … … 98 98 # output object. 99 99 def render_grouping(grouping,options={},&block) 100 render_helper( Renderer::Grouping,grouping,options,&block)100 render_helper(Controller::Grouping,grouping,options,&block) 101 101 end 102 102 … … 128 128 include RenderingTools 129 129 130 # Set by the <tt>:data</tt> attribute from Renderer#render130 # Set by the <tt>:data</tt> attribute from Controller#render 131 131 attr_reader :data 132 132 133 # Set automatically by Renderer#render(format) or Renderer#render_format133 # Set automatically by Controller#render(format) or Controller#render_format 134 134 attr_accessor :format 135 135 136 # Set automatically by Renderer#render as a Renderer::Options object built136 # Set automatically by Controller#render as a Controller::Options object built 137 137 # by the hash provided. 138 138 attr_writer :options 139 139 140 # Registers the formatter with one or more Renderers.141 # 142 # renders :pdf, :for => My Renderer143 # render :text, :for => [My Renderer,YourRenderer]144 # renders [:csv,:html], :for => Your Renderer140 # Registers the formatter with one or more Controllers. 141 # 142 # renders :pdf, :for => MyController 143 # render :text, :for => [MyController,YourController] 144 # renders [:csv,:html], :for => YourController 145 145 # 146 146 def self.renders(fmts,options={}) … … 157 157 # 158 158 # class ReversedText < Ruport::Formatter 159 # renders :txt, :for => Reverse Renderer159 # renders :txt, :for => ReverseController 160 160 # 161 161 # build :reversed_header do … … 189 189 end 190 190 191 # Provides a Renderer::Options object for storing formatting options.191 # Provides a Controller::Options object for storing formatting options. 192 192 def options 193 @options ||= Renderer::Options.new193 @options ||= Controller::Options.new 194 194 end 195 195 ruport/trunk/lib/ruport/formatter/csv.rb
r1285 r1287 15 15 16 16 # This formatter implements the CSV format for Ruport's Row, Table, Group 17 # and Grouping renderers. It is a light wrapper around17 # and Grouping controllers. It is a light wrapper around 18 18 # James Edward Gray II's FasterCSV. 19 19 # … … 32 32 class Formatter::CSV < Formatter 33 33 34 renders :csv, :for => [ Renderer::Row, Renderer::Table,35 Renderer::Group, Renderer::Grouping ]34 renders :csv, :for => [ Controller::Row, Controller::Table, 35 Controller::Group, Controller::Grouping ] 36 36 37 37 def initialize … … 61 61 62 62 # Generates table header by turning column_names into a CSV row. 63 # Uses the row renderer to generate the actual formatted output63 # Uses the row controller to generate the actual formatted output 64 64 # 65 65 # This method does not do anything if options.show_table_headers is false … … 72 72 end 73 73 74 # Calls the row renderer for each row in the Data::Table74 # Calls the row controller for each row in the Data::Table 75 75 def build_table_body 76 76 fcsv = csv_writer … … 89 89 end 90 90 91 # Renders the group body - uses the table renderer to generate the output.91 # Renders the group body - uses the table controller to generate the output. 92 92 # 93 93 def build_group_body ruport/trunk/lib/ruport/formatter/html.rb
r1281 r1287 13 13 module Ruport 14 14 # This class produces HTML output for Ruport's Row, Table, Group, and 15 # Grouping renderers. It can be subclassed, as it has some helper methods15 # Grouping controllers. It can be subclassed, as it has some helper methods 16 16 # that might be useful for custom output. 17 17 # … … 26 26 class Formatter::HTML < Formatter 27 27 28 renders :html, :for => [ Renderer::Row, Renderer::Table,29 Renderer::Group, Renderer::Grouping ]28 renders :html, :for => [ Controller::Row, Controller::Table, 29 Controller::Group, Controller::Grouping ] 30 30 31 31 # Hook for setting available options using a template. See the template … … 49 49 end 50 50 51 # Uses the Row renderer to build up the table body.51 # Uses the Row controller to build up the table body. 52 52 # Replaces nil and empty strings with " " 53 53 def build_table_body … … 77 77 78 78 # Creates the group body. Since group data is a table, just uses the 79 # Table renderer.79 # Table controller. 80 80 # 81 81 def build_group_body … … 84 84 85 85 # Generates the body for a grouping. Iterates through the groups and 86 # renders them using the group renderer.86 # renders them using the group controller. 87 87 # 88 88 def build_grouping_body ruport/trunk/lib/ruport/formatter/pdf.rb
r1236 r1287 16 16 17 17 # This class provides PDF output for Ruport's Table, Group, and Grouping 18 # renderers. It wraps Austin Ziegler's PDF::Writer to provide a higher18 # controllers. It wraps Austin Ziegler's PDF::Writer to provide a higher 19 19 # level interface and provides a number of helpers designed to make 20 20 # generating PDF reports much easier. You will typically want to build … … 50 50 end 51 51 52 renders :pdf, :for => [ Renderer::Row, Renderer::Table,53 Renderer::Group, Renderer::Grouping ]52 renders :pdf, :for => [ Controller::Row, Controller::Table, 53 Controller::Group, Controller::Grouping ] 54 54 55 55 attr_writer :pdf_writer … … 105 105 end 106 106 107 # Generates a header with the group name for Renderer::Group.107 # Generates a header with the group name for Controller::Group. 108 108 def build_group_header 109 109 pad(10) { add_text data.name.to_s, :justification => :center } 110 110 end 111 111 112 # Renders the group as a table for Renderer::Group.112 # Renders the group as a table for Controller::Group. 113 113 def build_group_body 114 114 render_table data, options.to_hash.merge(:formatter => pdf_writer) … … 116 116 117 117 # Determines which style to use and renders the main body for 118 # Renderer::Grouping.118 # Controller::Grouping. 119 119 def build_grouping_body 120 120 case options.style ruport/trunk/lib/ruport/formatter/template.rb
r1226 r1287 143 143 # FasterCSV.new 144 144 # 145 class Ruport::Formatter::Template < Ruport:: Renderer::Options145 class Ruport::Formatter::Template < Ruport::Controller::Options 146 146 147 147 # Returns all existing templates in a hash keyed by the template names. ruport/trunk/lib/ruport/formatter/text.rb
r1281 r1287 14 14 15 15 # This class provides text output for Ruport's Row, Table, Group, and 16 # Grouping renderers16 # Grouping controllers 17 17 # 18 18 # It handles things like automatically truncating tables that go off the … … 46 46 class Formatter::Text < Formatter 47 47 48 renders [:txt, :text], :for => [ Renderer::Row, Renderer::Table,49 Renderer::Group, Renderer::Grouping ]48 renders [:txt, :text], :for => [ Controller::Row, Controller::Table, 49 Controller::Group, Controller::Grouping ] 50 50 51 51 # Hook for setting available options using a template. See the template … … 130 130 131 131 # Creates the group body. Since group data is a table, just uses the 132 # Table renderer.132 # Table controller. 133 133 # 134 134 def build_group_body … … 137 137 138 138 # Generates the body for a grouping. Iterates through the groups and 139 # renders them using the group renderer.139 # renders them using the group controller. 140 140 # 141 141 def build_grouping_body ruport/trunk/lib/ruport/renderer.rb
r1283 r1287 1 # renderer.rb : General purpose formatted data rendererfor Ruby Reports1 # controller.rb : General purpose control of formatted data for Ruby Reports 2 2 # 3 3 # Copyright December 2006, Gregory Brown. All Rights Reserved. … … 6 6 7 7 8 # This class implements the core renderer for Ruport's formatting system. It is9 # designed to implement the low level tools necessary to build report renderers10 # for different kinds of tasks. See Renderer::Table for a tabular data11 # renderer.8 # This class implements the core controller for Ruport's formatting system. 9 # It is designed to implement the low level tools necessary to build report 10 # controllers for different kinds of tasks. See Controller::Table for a 11 # tabular data controller. 12 12 # 13 class Ruport:: Renderer13 class Ruport::Controller 14 14 15 15 class RequiredOptionNotSet < RuntimeError #:nodoc: … … 19 19 class StageAlreadyDefinedError < RuntimeError #:nodoc: 20 20 end 21 class RendererNotSetError < RuntimeError #:nodoc:21 class ControllerNotSetError < RuntimeError #:nodoc: 22 22 end 23 23 24 24 require "ostruct" 25 25 26 # Structure for holding renderer options.26 # Structure for holding controller options. 27 27 # Simplified version of HashWithIndifferentAccess 28 28 class Options < OpenStruct … … 60 60 # 61 61 # You can actually use this with any data structure, it will look for a 62 # renderable_data(format) method to pass to the <tt> renderer</tt> you62 # renderable_data(format) method to pass to the <tt>controller</tt> you 63 63 # specify, but if that is not defined, it will pass <tt>self</tt>. 64 64 # 65 65 # Examples: 66 66 # 67 # # Render Arrays with Ruport's Row Renderer67 # # Render Arrays with Ruport's Row Controller 68 68 # class Array 69 # include Ruport:: Renderer::Hooks69 # include Ruport::Controller::Hooks 70 70 # renders_as_row 71 71 # end … … 74 74 # # => "1,2,3\n" 75 75 # 76 # # Render Hashes with Ruport's Row Renderer76 # # Render Hashes with Ruport's Row Controller 77 77 # class Hash 78 # include Ruport:: Renderer::Hooks78 # include Ruport::Controller::Hooks 79 79 # renders_as_row 80 80 # attr_accessor :column_order … … 91 91 module ClassMethods 92 92 93 # Tells the class which renderer as() will forward to.93 # Tells the class which controller as() will forward to. 94 94 # 95 95 # Usage: 96 96 # 97 97 # class MyStructure 98 # include Renderer::Hooks99 # renders_with Custom Renderer98 # include Controller::Hooks 99 # renders_with CustomController 100 100 # end 101 101 # … … 104 104 # 105 105 # class MyStructure 106 # include Renderer::Hooks107 # renders_with Custom Renderer, :font_size => 14106 # include Controller::Hooks 107 # renders_with CustomController, :font_size => 14 108 108 # end 109 def renders_with( renderer,opts={})110 @ renderer = renderer109 def renders_with(controller,opts={}) 110 @controller = controller 111 111 @rendering_options=opts 112 112 end … … 117 117 end 118 118 119 # Shortcut for renders_with(Ruport:: Renderer::Table), you120 # may wish to override this if you build a custom table renderer.119 # Shortcut for renders_with(Ruport::Controller::Table), you 120 # may wish to override this if you build a custom table controller. 121 121 def renders_as_table(options={}) 122 renders_with Ruport:: Renderer::Table,options122 renders_with Ruport::Controller::Table,options 123 123 end 124 124 125 # Shortcut for renders_with(Ruport:: Renderer::Row), you126 # may wish to override this if you build a custom row renderer.125 # Shortcut for renders_with(Ruport::Controller::Row), you 126 # may wish to override this if you build a custom row controller. 127 127 def renders_as_row(options={}) 128 renders_with Ruport:: Renderer::Row, options128 renders_with Ruport::Controller::Row, options 129 129 end 130 130 131 # Shortcut for renders_with(Ruport:: Renderer::Group), you132 # may wish to override this if you build a custom group renderer.131 # Shortcut for renders_with(Ruport::Controller::Group), you 132 # may wish to override this if you build a custom group controller. 133 133 def renders_as_group(options={}) 134 renders_with Ruport:: Renderer::Group,options134 renders_with Ruport::Controller::Group,options 135 135 end 136 136 137 # Shortcut for renders_with(Ruport:: Renderer::Grouping), you138 # may wish to override this if you build a custom grouping renderer.137 # Shortcut for renders_with(Ruport::Controller::Grouping), you 138 # may wish to override this if you build a custom grouping controller. 139 139 def renders_as_grouping(options={}) 140 renders_with Ruport:: Renderer::Grouping,options140 renders_with Ruport::Controller::Grouping,options 141 141 end 142 142 143 # The class of the renderer object for the base class.143 # The class of the controller object for the base class. 144 144 # 145 145 # Example: 146 146 # 147 # >> Ruport::Data::Table. renderer148 # => Ruport:: Renderer::Table149 def renderer150 @ renderer147 # >> Ruport::Data::Table.controller 148 # => Ruport::Controller::Table 149 def controller 150 @controller 151 151 end 152 152 end … … 156 156 end 157 157 158 # Uses the Renderer specified by renders_with to generate formatted158 # Uses the Controller specified by renders_with to generate formatted 159 159 # output. Passes the return value of the <tt>renderable_data(format)</tt> 160 160 # method if the method is defined, otherwise passes <tt>self</tt> as :data 161 161 # 162 # The remaining options are converted to a Renderer::Options object and163 # are accessible in both the renderer and formatter.162 # The remaining options are converted to a Controller::Options object and 163 # are accessible in both the controller and formatter. 164 164 # 165 165 # Example: … … 167 167 # table.as(:csv, :show_table_headers => false) 168 168 def as(format,options={}) 169 raise RendererNotSetError unless self.class.renderer170 unless self.class. renderer.formats.include?(format)169 raise ControllerNotSetError unless self.class.controller 170 unless self.class.controller.formats.include?(format) 171 171 raise UnknownFormatError 172 172 end 173 self.class. renderer.render(format,173 self.class.controller.render(format, 174 174 self.class.rendering_options.merge(options)) do |rend| 175 175 rend.data = … … 196 196 # Usage: 197 197 # 198 # class My Renderer < Ruport::Renderer198 # class MyController < Ruport::Controller 199 199 # # other details omitted... 200 200 # finalize :apple … … 202 202 # 203 203 # class MyFormatter < Ruport::Formatter 204 # renders :example, :for => My Renderer204 # renders :example, :for => MyController 205 205 # 206 206 # # other details omitted... 207 207 # 208 208 # def finalize_apple 209 # # this method will be called when My Renderer tries to render209 # # this method will be called when MyController tries to render 210 210 # # the :example format 211 211 # end … … 225 225 # Usage: 226 226 # 227 # class My Renderer < Ruport::Renderer227 # class MyController < Ruport::Controller 228 228 # # other details omitted... 229 229 # prepare :apple … … 231 231 # 232 232 # class MyFormatter < Ruport::Formatter 233 # renders :example, :for => My Renderer233 # renders :example, :for => MyController 234 234 # 235 235 # def prepare_apple 236 # # this method will be called when My Renderer tries to render236 # # this method will be called when MyController tries to render 237 237 # # the :example format 238 238 # end … … 254 254 # Usage: 255 255 # 256 # class My Renderer < Ruport::Renderer256 # class MyController < Ruport::Controller 257 257 # # other details omitted... 258 258 # stage :apple,:banana … … 260 260 # 261 261 # class MyFormatter < Ruport::Formatter 262 # renders :example, :for => My Renderer262 # renders :example, :for => MyController 263 263 # 264 264 # def build_apple 265 # # this method will be called when My Renderer tries to render265 # # this method will be called when MyController tries to render 266 266 # # the :example format 267 267 # end 268 268 # 269 269 # def build_banana 270 # # this method will be called when My Renderer tries to render270 # # this method will be called when MyController tries to render 271 271 # # the :example format 272 272 # end … … 283 283 end 284 284 285 # Defines attribute writers for the Renderer::Options object shared286 # between Renderer and Formatter. Will throw an error if the user does285 # Defines attribute writers for the Controller::Options object shared 286 # between Controller and Formatter. Will throw an error if the user does 287 287 # not provide values for these options upon rendering. 288 288 # 289 289 # usage: 290 290 # 291 # class My Renderer < Ruport::Renderer291 # class MyController < Ruport::Controller 292 292 # required_option :employee_name, :address 293 293 # # other details omitted … … 307 307 end 308 308 309 # Lists the formatters that are currently registered on a renderer,309 # Lists the formatters that are currently registered on a controller, 310 310 # as a hash keyed by format name. 311 311 # 312 312 # Example: 313 313 # 314 # >> Ruport:: Renderer::Table.formats314 # >> Ruport::Controller::Table.formats 315 315 # => {:html=>Ruport::Formatter::HTML, 316 316 # ?> :csv=>Ruport::Formatter::CSV, … … 321 321 end 322 322 323 # Builds up a renderer object, looks up the appropriate formatter,323 # Builds up a controller object, looks up the appropriate formatter, 324 324 # sets the data and options, and then does the following process: 325 325 # 326 # * If the renderer contains a module Helpers, mix it in to the instance.327 # * If a block is given, yield the Renderer instance.328 # * If a setup() method is defined on the Renderer, call it.326 # * If the controller contains a module Helpers, mix it in to the instance. 327 # * If a block is given, yield the Controller instance. 328 # * If a setup() method is defined on the Controller, call it. 329 329 # * Call the run() method. 330 330 # * If the :file option is set to a file name, appends output to the file. 331 331 # * Return the results of formatter.output 332 332 # 333 # Please see the examples/ directory for custom renderer examples, because333 # Please see the examples/ directory for custom controller examples, because 334 334 # this is not nearly as complicated as it sounds in most cases. 335 335 def render(format, add_options=nil) … … 350 350 # 351 351 def options 352 @options ||= Ruport:: Renderer::Options.new352 @options ||= Ruport::Controller::Options.new 353 353 yield(@options) if block_given? 354 354 … … 358 358 private 359 359 360 # Creates a new instance of the renderer and sets it to use the specified361 # formatter (by name). If a block is given, the renderer instance is360 # Creates a new instance of the controller and sets it to use the specified 361 # formatter (by name). If a block is given, the controller instance is 362 362 # yielded. 363 363 # 364 # Returns the renderer instance.364 # Returns the controller instance. 365 365 # 366 366 def build(format, add_options=nil) … … 382 382 end 383 383 384 # Allows you to register a format with the renderer.384 # Allows you to register a format with the controller. 385 385 # 386 386 # Example: … … 388 388 # class MyFormatter < Ruport::Formatter 389 389 # # formatter code ... 390 # Some Renderer.add_format self, :my_formatter390 # SomeController.add_format self, :my_formatter 391 391 # end 392 392 # … … 413 413 end 414 414 415 # Renderer::Options object which is shared with the current formatter.415 # Controller::Options object which is shared with the current formatter. 416 416 def options 417 417 yield(formatter.options) if block_given? … … 420 420 421 421 # Call the _run_ method. You can override this method in your custom 422 # renderer if you need to define other actions.422 # controller if you need to define other actions. 423 423 def run 424 424 _run_ … … 426 426 427 427 # If an IO object is given, Formatter#output will use it instead of 428 # the default String. For Ruport's core renderers, we technically428 # the default String. For Ruport's core controllers, we technically 429 429 # can use any object that supports the << method, but it's meant 430 430 # for IO objects such as File or STDOUT ruport/trunk/lib/ruport/renderer/grouping.rb
r1210 r1287 1 1 # Ruport : Extensible Reporting System 2 2 # 3 # renderer/grouping.rb : Group data renderer for Ruby Reports3 # controller/grouping.rb : Group data controller for Ruby Reports 4 4 # 5 5 # Written by Michael Milner, 2007. … … 11 11 module Ruport 12 12 13 # This class implements the basic renderer for a single group of data.13 # This class implements the basic controller for a single group of data. 14 14 # 15 15 # == Supported Formatters … … 30 30 # * build_group_footer 31 31 # 32 class Renderer::Group < Renderer32 class Controller::Group < Controller 33 33 options { |o| o.show_table_headers = true } 34 34 … … 36 36 end 37 37 38 # This class implements the basic renderer for data groupings in Ruport38 # This class implements the basic controller for data groupings in Ruport 39 39 # (a collection of Groups). 40 40 # … … 58 58 # * finalize_grouping 59 59 # 60 class Renderer::Grouping < Renderer60 class Controller::Grouping < Controller 61 61 options do |o| 62 62 o.show_group_headers = true ruport/trunk/lib/ruport/renderer/table.rb
r1210 r1287 1 # renderer/table.rb : Tabular data renderer for Ruby Reports1 # controller/table.rb : Tabular data controller for Ruby Reports 2 2 # 3 3 # Written by Gregory Brown, December 2006. Copyright 2006, All Rights Reserved … … 6 6 module Ruport 7 7 8 # This class implements the basic renderer for table rows.8 # This class implements the basic controller for table rows. 9 9 # 10 10 # == Supported Formatters … … 18 18 # * build_row 19 19 # 20 class Renderer::Row < Renderer20 class Controller::Row < Controller 21 21 stage :row 22 22 end 23 23 24 # This class implements the basic tabular data renderer for Ruport.24 # This class implements the basic tabular data controller for Ruport. 25 25 # 26 26 # == Supported Formatters … … 43 43 # * finalize_table 44 44 # 45 class Renderer::Table < Renderer45 class Controller::Table < Controller 46 46 options { |o| o.show_table_headers = true } 47 47
