ariatemplates/hashspace — pull request #211 by b-laporte (2014-06-22 20:20:22+00:00)
Title: support objects as pipe modifiers

This PR adds the possibility to put objects - and not only functions - as pipe modifiers. For this, objects have to implement an *apply()* method that will be called when the expression is evaluated.
Main benefit is to simplify writing and reading of pipe expressions for standard sort/filter/paginate use cases (as suggested by @piuccio in a previous discussion).

This will allow writing things like that (on top of what is already possible):
```

{let nameSort=new Sorter("firstName")}
Sorted list:

{foreach p in d.persons|nameSort}

{p.firstName} {p.lastName}

{/foreach}

Toggle sort order (current: {nameSort.ascending? "ascending" : "descending"})

```