Class: NucleusCore::CsvResponse
- Inherits:
-
ResponseAdapter
- Object
- SimpleObject
- ResponseAdapter
- NucleusCore::CsvResponse
- Defined in:
- lib/nucleus_core/response_adapters/csv_response.rb
Instance Attribute Summary
Attributes inherited from SimpleObject
Instance Method Summary collapse
-
#initialize(attrs = {}) ⇒ CsvResponse
constructor
A new instance of CsvResponse.
Methods inherited from SimpleObject
Constructor Details
#initialize(attrs = {}) ⇒ CsvResponse
Returns a new instance of CsvResponse.
4 5 6 7 8 9 10 11 12 |
# File 'lib/nucleus_core/response_adapters/csv_response.rb', line 4 def initialize(attrs={}) attrs = attrs.merge( disposition: "attachment", filename: attrs.fetch(:filename) { "response.csv" }, type: "text/csv; charset=UTF-8;" ) super(attrs) end |