Module: FoxPage::Helpers::TagHelper

Defined in:
lib/fox_page/helpers/tag_helper.rb

Defined Under Namespace

Classes: TagBuilder

Instance Method Summary collapse

Instance Method Details

#content_tag(name, content_or_options_with_block = nil, options = nil, &block) ⇒ Object



34
35
36
37
38
39
40
41
42
43
# File 'lib/fox_page/helpers/tag_helper.rb', line 34

def (name, content_or_options_with_block = nil, options = nil, &block)
  content = content_or_options_with_block
  if block_given?
    options = content_or_options_with_block
    content = block.call
  end
  options ||= {}

  TagBuilder.new(name:, content:, options:).build
end