examples/graphics/hexagon.rb in prawn-0.11.1.pre vs examples/graphics/hexagon.rb in prawn-0.11.1
- old
+ new
@@ -1,13 +1,14 @@
# encoding: utf-8
#
# Draws and fills a Hexagon using Document#polygon
#
-require "#{File.dirname(__FILE__)}/../example_helper.rb"
+require File.expand_path(File.join(File.dirname(__FILE__),
+ %w[.. example_helper]))
pdf = Prawn::Document.new
pdf.fill_color "ff0000"
pdf.fill_polygon [100, 250], [200, 300], [300, 250],
[300, 150], [200, 100], [100, 150]
-pdf.render_file "hexagon.pdf"
\ No newline at end of file
+pdf.render_file "hexagon.pdf"