Closed ulrik closed 5 years ago
This has been proposed before but we want to avoid making the actual word document templates more complex, see #73.
This can be done via a custom field handler, and I actually have it implemented as a test case here https://github.com/senny/sablon/blob/master/test/custom_field_handler_test.rb#67.
Let me know if you have any other questions!
I need to be able to make the if statement compare the given value with a string.
I would therefore purpose a syntax like this
I guess the line in lib/sablon/operations.rb
value = value.public_send(predicate) if predicate
could be generalized to let public_send take more arguments, but I can't see how it could be done...