Class: NucleusCore::PdfResponse

Inherits:
ResponseAdapter show all
Defined in:
lib/nucleus_core/response_adapters/pdf_response.rb

Instance Attribute Summary

Attributes inherited from SimpleObject

#__attributes__

Instance Method Summary collapse

Methods inherited from SimpleObject

#to_h

Constructor Details

#initialize(attrs = {}) ⇒ PdfResponse

Returns a new instance of PdfResponse.



4
5
6
7
8
9
10
11
12
# File 'lib/nucleus_core/response_adapters/pdf_response.rb', line 4

def initialize(attrs={})
  attrs = attrs.merge(
    disposition: "inline",
    filename: attrs.fetch(:filename) { "response.pdf" },
    type: "application/pdf"
  )

  super(attrs)
end