Class: CleanArchitecture::Serializers::JsonResponseFromResult
- Inherits:
-
Object
- Object
- CleanArchitecture::Serializers::JsonResponseFromResult
- Defined in:
- lib/clean_architecture/serializers/json_response_from_result.rb
Instance Method Summary collapse
-
#initialize(result, http_method, success_payload) ⇒ JsonResponseFromResult
constructor
A new instance of JsonResponseFromResult.
- #to_h ⇒ Object
Constructor Details
#initialize(result, http_method, success_payload) ⇒ JsonResponseFromResult
Returns a new instance of JsonResponseFromResult.
10 11 12 13 14 |
# File 'lib/clean_architecture/serializers/json_response_from_result.rb', line 10 def initialize(result, http_method, success_payload) @result = result @http_method = http_method @success_payload = success_payload end |
Instance Method Details
#to_h ⇒ Object
16 17 18 19 20 21 |
# File 'lib/clean_architecture/serializers/json_response_from_result.rb', line 16 def to_h { status: http_status_code, json: json } end |