Class: NucleusCore::ResponseAdapter
- Inherits:
-
SimpleObject
- Object
- SimpleObject
- NucleusCore::ResponseAdapter
- Defined in:
- lib/nucleus_core/response_adapters/response_adapter.rb
Direct Known Subclasses
CsvResponse, JsonResponse, NoResponse, PdfResponse, TextResponse, XmlResponse
Instance Attribute Summary
Attributes inherited from SimpleObject
Instance Method Summary collapse
-
#initialize(attrs = {}) ⇒ ResponseAdapter
constructor
A new instance of ResponseAdapter.
Methods inherited from SimpleObject
Constructor Details
#initialize(attrs = {}) ⇒ ResponseAdapter
Returns a new instance of ResponseAdapter.
4 5 6 7 8 9 10 11 12 13 |
# File 'lib/nucleus_core/response_adapters/response_adapter.rb', line 4 def initialize(attrs={}) attributes = defaults .merge(attrs) .slice(*defaults.keys) .tap do |hash| hash[:status] = status_code(hash[:status]) end super(attributes) end |