Fixed decorator sample (thanks tixz)

* TextDecorator was written in JavaScript-style function assignment,
  making the @processors variable drop out of scope

* Rewrote it as class TextDecorator and included a constructor to set
  the var