Method: PDF::QuickRef#codelines
- Defined in:
- lib/extensions/pdf-writer/pdf/quickref.rb
#codelines(text) ⇒ Object
Creates a one-column zebra-striped table using the #code font. Each line of the text is a separate row.
202 203 204 205 206 207 208 209 |
# File 'lib/extensions/pdf-writer/pdf/quickref.rb', line 202 def codelines(text) data = text.split($/).map { |line| { "line" => line } } @ltab.data.replace data use_code_font @ltab.render_on(@pdf) use_body_font @pdf.text "\n", :font_size => @body_font_size end |