title: Can I save a generated by prawn pdf file to the profect folder, using initialize method?
body: <p>I have an <code>OrderPdf</code> class that inherits from <code>Prawn::Document</code> Here is the content of the class: </p>
  
  <pre><code>class OrderPdf &lt; Prawn::Document
    include ActionView::Helpers::NumberHelper
    include ActionView::Helpers::TagHelper
  
    def initialize(order)
      super(top_margin: 50, size: 12)
      @order = order
      logo
      # Other methods that generate pdf's content
      footer
    end
  
    def logo
      # Some stuff here
    end
  
    def footer
      #Some stuff here
    end
  end
  </code></pre>
  
  <p>I call it like this: <code>OrderPdf.new(@order)</code>. Pdf file is generated, but what I need - is to save it into my project with the name, something like this: <code>"#{Rails.root}/public/uploads/orders/order-#{order.order_number}.pdf"</code> I know, that I can do this: <code>Prawn::Document.generate("#{Rails.root}/public/uploads/orders/order-#{order.order_number}.pdf")</code>, but can I do something simialar with the existing code? Thanks ahead.</p>