Class: ContentBlockTools::Presenters::BlockPresenters::Contact::AddressPresenter

Inherits:
BasePresenter
  • Object
show all
Defined in:
lib/content_block_tools/presenters/block_presenters/contact/address_presenter.rb

Instance Attribute Summary

Attributes inherited from BasePresenter

#item

Instance Method Summary collapse

Methods inherited from BasePresenter

#initialize, #title_content

Constructor Details

This class inherits a constructor from ContentBlockTools::Presenters::BlockPresenters::BasePresenter

Instance Method Details

#renderObject



6
7
8
9
10
11
12
13
14
15
16
# File 'lib/content_block_tools/presenters/block_presenters/contact/address_presenter.rb', line 6

def render
  (:p, class: "govuk-body govuk-!-margin-bottom-4") do
    [
      item[:street_address],
      item[:locality],
      item[:region],
      item[:postal_code],
      item[:country],
    ].compact_blank.join(",<br/>").html_safe
  end
end