Skip to content

Instantly share code, notes, and snippets.

@mh-github
Last active June 1, 2017 19:10
Show Gist options
  • Select an option

  • Save mh-github/3da56eb6df8a0b0d4bdef741f51c0727 to your computer and use it in GitHub Desktop.

Select an option

Save mh-github/3da56eb6df8a0b0d4bdef741f51c0727 to your computer and use it in GitHub Desktop.
require 'prawn/table'
def instruments_table_data
@instruments_table_data = [["Equipment", "Qty", "Scope"]]
@offers_instruments.each do |instr|
@instruments_table_data << [instr['name'], instr['qty'], instr['scope']]
end
return @instruments_table_data
end
t = make_table instruments_table_data, header: true
if cursor < 100 + t.height
start_new_page
move_down 50
end
move_down 15
text "<u>SCOPE OF INSTRUMENTS</u>", :style => :bold, :inline_format => true
move_down 10
text "Instruments scope is as given below:"
move_down 15
indent(40) {t.draw}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment