Module: XClarityClient::Services::ListNameInterpreterMixin
- Included in:
- ResponseBuilderMixin
- Defined in:
- lib/xclarity_client/services/mixins/list_name_interpreter_mixin.rb
Overview
A list name interpreter knows how to get the correct list name present on endpoint response, and, if the list doesn’t exist, add the list property to the reponse with the right name.
Instance Method Summary collapse
-
#add_listname_on_body(endpoint_class, body) ⇒ Object
Process the response body to make sure that its contains the list name defined on resource.
Instance Method Details
#add_listname_on_body(endpoint_class, body) ⇒ Object
Process the response body to make sure that its contains the list name defined on resource
15 16 17 |
# File 'lib/xclarity_client/services/mixins/list_name_interpreter_mixin.rb', line 15 def add_listname_on_body(endpoint_class, body) body.kind_of?(Array) ? process_body_as_array(endpoint_class, body) : process_body_as_hash(endpoint_class, body) end |