lib/middleware/base.rb in tracksperanto-1.2.4 vs lib/middleware/base.rb in tracksperanto-1.2.6

- old
+ new

@@ -2,10 +2,19 @@ # as an export format. Middleware can be used to massage the tracks being exported in various interesting ways - like moving the coordinates, clipping the keyframes, # scaling the whole export or even reversing the trackers to go backwards class Tracksperanto::Middleware::Base include Tracksperanto::Casts include Tracksperanto::BlockInit + include Tracksperanto::ConstName + # Used to automatically register your middleware in Tracksperanto.middlewares + # Normally you wouldn't need to override this + def self.inherited(by) + Tracksperanto.middlewares << 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) end \ No newline at end of file