Rapporter/rapport

"Classy" inputs in evaluation environment

Closed this issue · 1 comments

This one is related to #66. In a nutshell, it would be nice if all inputs can have their own class attribute. That way we can build some custom methods and differentiate the environment objects that originate from the template inputs from the ones made by the user in the template body.

In addition to that, dunno if it would be practical/manageable to separate the environments for header and body... as currently rapport doesn't issue a warning if use overrides the input in the evaluation environment. But I guess that this should go to a separate issue.

Anyway, by introducing custom classes to binded template inputs (the ones that were assigned in the template's environment), we can surely benefit by introducing more helpers, like: ls.input() or length.input(), as I get frustrated when I want to write that this template has this many inputs, N of which are of this class.

I guess you have other plans for me, so please prioritise this one to you own liking. 😄

Let's assume that template authors know their jobs :) But please feel free to reopen at any time, although I do not really see any decent need for this feature ATM.