Skip to content

Instantly share code, notes, and snippets.

@dennym
Created December 29, 2015 15:14
Show Gist options
  • Save dennym/83aa9a4df49a99a54d1b to your computer and use it in GitHub Desktop.
Save dennym/83aa9a4df49a99a54d1b to your computer and use it in GitHub Desktop.

Revisions

  1. Denny Mueller renamed this gist Dec 29, 2015. 1 changed file with 0 additions and 0 deletions.
    File renamed without changes.
  2. Denny Mueller created this gist Dec 29, 2015.
    16 changes: 16 additions & 0 deletions Prawn.rb pattern
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,16 @@
    Prawn::Document.generate(prawn_file) do
    y = 790
    79.times do
    x = -30
    58.times do
    bounding_box([x,y], :width => 10, :height => 10) do
    stroke_color '000000'
    stroke_bounds
    text_box "#{x}", :size => 5, :at=> [0,10], :width => 10, :height => 10, color: 'ff0000' if y == 790
    text_box "#{y}", :size => 5, :at=> [0,10], :width => 10, :height => 10, color: 'ff0000' if x == -30
    end
    x = x + 10
    end
    y = y - 10
    end
    end