Class: Kentico::Kontent::Delivery::Responses::DeliveryTypeResponse
- Inherits:
-
ResponseBase
- Object
- ResponseBase
- Kentico::Kontent::Delivery::Responses::DeliveryTypeResponse
- Defined in:
- lib/delivery/responses/delivery_type_response.rb
Overview
The response of a successful query for a content type. See github.com/Kentico/kontent-delivery-sdk-ruby#retrieving-content-types
Instance Attribute Summary
Attributes inherited from ResponseBase
Instance Method Summary collapse
-
#initialize(response) ⇒ DeliveryTypeResponse
constructor
A new instance of DeliveryTypeResponse.
-
#type ⇒ Object
A Kentico::Kontent::Delivery::ContentType object from a Kentico::Kontent::Delivery::DeliveryClient.type call.
Methods inherited from ResponseBase
Constructor Details
#initialize(response) ⇒ DeliveryTypeResponse
Returns a new instance of DeliveryTypeResponse.
21 22 23 24 25 26 |
# File 'lib/delivery/responses/delivery_type_response.rb', line 21 def initialize(response) @response = response super 200, "Success, type '#{type.system.codename}' returned", JSON.generate(@response) end |
Instance Method Details
#type ⇒ Object
A Kentico::Kontent::Delivery::ContentType object from a Kentico::Kontent::Delivery::DeliveryClient.type call.
-
Returns:
-
Kentico::Kontent::Delivery::ContentType
-
16 17 18 19 |
# File 'lib/delivery/responses/delivery_type_response.rb', line 16 def type @type unless @type.nil? @type = Kentico::Kontent::Delivery::ContentType.new(@response) end |