Class: GovukTaxonomyHelpers::PublishingApiResponse
- Inherits:
-
Object
- Object
- GovukTaxonomyHelpers::PublishingApiResponse
- Defined in:
- lib/govuk_taxonomy_helpers/publishing_api_response.rb
Instance Attribute Summary collapse
-
#linked_content_item ⇒ Object
Returns the value of attribute linked_content_item.
Instance Method Summary collapse
-
#initialize(content_item:, expanded_links:, publishing_api:) ⇒ PublishingApiResponse
constructor
A new instance of PublishingApiResponse.
Constructor Details
#initialize(content_item:, expanded_links:, publishing_api:) ⇒ PublishingApiResponse
Returns a new instance of PublishingApiResponse.
23 24 25 26 27 28 29 30 31 32 33 34 |
# File 'lib/govuk_taxonomy_helpers/publishing_api_response.rb', line 23 def initialize(content_item:, expanded_links:, publishing_api:) details = content_item["details"] || {} @linked_content_item = LinkedContentItem.new( title: content_item["title"], internal_name: details["internal_name"], content_id: content_item["content_id"], base_path: content_item["base_path"] ) (, publishing_api) end |
Instance Attribute Details
#linked_content_item ⇒ Object
Returns the value of attribute linked_content_item.
18 19 20 |
# File 'lib/govuk_taxonomy_helpers/publishing_api_response.rb', line 18 def linked_content_item @linked_content_item end |