Module: Merb::Helpers::Tag

Module | Merb::Helpers::Tag
In: | lib/merb-helpers/tag_helpers.rb

### Methods

close_tag open_tag self_closing_tag tag

### Public Instance methods

close_tag(name)

Creates a closing tag

open_tag(name, attrs = nil)

Creates the opening tag with attributes for the provided `name` attrs is a hash where all members will be mapped to key="value"

Note: This tag will need to be closed

self_closing_tag(name, attrs = nil)

Creates a self closing tag. Like <br/> or <img src="…"/>

`name` : the name of the tag to create `attrs` : a hash where all members will be mapped to key="value"

tag(name, contents = nil, attrs = {}, &block)

Creates a generic HTML tag. You can invoke it a variety of ways.

      tag :div
      # <div></div>

      tag :div, 'content'
      # <div>content</div>

      tag :div, :class => 'class'
      # <div class="class"></div>

      tag :div, 'content', :class => 'class'
      # <div class="class">content</div>

      tag :div do
        'content'
      end
      # <div>content</div>

      tag :div, :class => 'class' do
        'content'
      end
      # <div class="class">content</div>

[Validate]