Module: ContentBlockTools::Presenters::BlockPresenters::Contact::BlockLevelContactItem
- Included in:
- AddressPresenter, ContactFormPresenter, EmailAddressPresenter, TelephonePresenter
- Defined in:
- lib/content_block_tools/presenters/block_presenters/contact/block_level_contact_item.rb
Constant Summary collapse
- BASE_TAG_TYPE =
:div
Instance Method Summary collapse
Instance Method Details
#initialize(item, rendering_context: :block, **_args) ⇒ Object
8 9 10 11 |
# File 'lib/content_block_tools/presenters/block_presenters/contact/block_level_contact_item.rb', line 8 def initialize(item, rendering_context: :block, **_args) @item = item @rendering_context = rendering_context end |
#wrapper(&block) ⇒ Object
13 14 15 16 17 18 19 20 21 |
# File 'lib/content_block_tools/presenters/block_presenters/contact/block_level_contact_item.rb', line 13 def wrapper(&block) if @rendering_context == :field_names content_tag(:div, class: "contact") do yield block end else yield block end end |