dimagi/fluff — pull request #24 by snopoke (2013-06-05 10:35:08+00:00)
Title: Allow emitters to emit custom values

Basic idea is to allow emitter functions to return a value to be emitted from the couch view instead of just '1'. The reduce function also changed to _stats so that you have the option of `sum`, `count`, `max`, `min` and `sumsqr`.

```python
class ValueCalculator(fluff.Calculator):
@fluff.date_emitter
@fluff.emit_custom_value('max')
def temp_max(self, case):
for action in case.actions:
if is_temp(case):
yield [action.date, action.temperature]
```