Haml::Helpers#haml_tag

Parsed documentation:
View on GitHub
Creates an HTML tag with the given name and optionally text and attributes.
Can take a block that will run between the opening and closing tags.
If the block is a Haml block or outputs text using \{#haml\_concat},
the text will be properly indented.

`name` can be a string using the standard Haml class/id shorthand
(e.g. "span#foo.bar", "#foo").
Just like standard Haml tags, these class and id values
will be merged with manually-specified attributes.

`flags` is a list of symbol flags
like those that can be put at the end of a Haml tag
(`:/`, `:<`, and `:>`).
Currently, only `:/` and `:<` are supported.

`haml_tag` outputs directly to the buffer;
its return value should not be used.
If you need to get the results as a string,
use \{#capture\_haml\}.

For example,

    haml_tag :table do
      haml_tag :tr do
        haml_tag 'td.cell' do
          haml_tag :strong, "strong!"
          haml_concat "data"
        end
        haml_tag :td do
          haml_concat "more_data"
        end
      end
    end

outputs

    <table>
      <tr>
        <td class='cell'>
          <strong>
            strong!
          </strong>
          data
        </td>
        <td>
          more_data
        </td>
      </tr>
    </table>

@param name [#to_s] The name of the tag

@overload haml_tag(name, *rest, attributes = {})
  @yield The block of Haml code within the tag
@overload haml_tag(name, text, *flags, attributes = {})
  @param text [#to_s] The text within the tag
  @param flags [Array<Symbol>] Haml end-of-tag flags
Suggestions:
Please help! Open an issue on GitHub if this assessment is incorrect.