lib/middleware/base.rb in tracksperanto-2.0.1 vs lib/middleware/base.rb in tracksperanto-2.0.2

- old
+ new

@@ -8,17 +8,17 @@ include Tracksperanto::SimpleExport # Used to automatically register your middleware in Tracksperanto.middlewares # Normally you wouldn't need to override this def self.inherited(by) - Tracksperanto.middlewares << by + Tracksperanto.middlewares.push(by) super end # Constructor accepts the exporter that will be wrapped - def initialize(exporter, *args_for_block_init) - @exporter = exporter - super(*args_for_block_init) + def initialize(*exporter_and_args_for_block_init) + @exporter = exporter_and_args_for_block_init.shift + super end # Called on export start def start_export( img_width, img_height) @exporter.start_export(img_width, img_height) \ No newline at end of file