You can draw lines separately:
require "prawn"
Prawn::Document.generate("bbox.pdf") do
x = 175
y = 200
width = 100
height = 50
color = 'FFFF00'
stroke do
stroke_color color
vertical_line y, y+height, :at => x
vertical_line y, y+height, :at => x+width
horizontal_line x, x+width, :at => y+height
end
stroke do
stroke_color color
dash 10, space: 4
horizontal_line x, x+width, :at => y
end
end
He outputs

source
share