The LaTeX templating engine is basically ye olde ERB, so you'll be wanting to
do stuff like
<%= @invoice.name %>
You might want to take a look at the rtex documentation, in particular the +l+
method, which will escape LaTeX special characters.
<%= l entry.description %>
For a full reference of which instance variables are available to your template,
see <tt>Invoice#with_template_variables</tt>. For a full reference of what
methods you can call on them, consult the source or RDoc output.
The CSV templates are just ruby files with a CSV generator object made
available in <tt>@csv</tt>, along with the usual instance variables from
<tt>Invoice#with_template_variables</tt>. See Ruby stdlib CSV documentation for
== Library Usage
You can also use GIP as a Ruby library if you're wanting to get down and dirty.
Since I wanted it all in one file until I package it up in a gem, you have to
do a little hack so that the require call doesn't fuck with your program:
ENV['GIP_DONT_RUN'] = '1'
If you were to not set GIP_DONT_RUN, or set it to something other than '1', your
program will abort looking for commandline arguments. Of course the following
bash command is equivalent to the above Ruby: