Method: Microformats::Helpers#vaddress

Defined in:
lib/helpers.rb

#vaddress(opts = {}, &block) ⇒ Object

Creates a vAddress with the given options and a block.

OPTIONS:

  • :type - A string that specifies the type of address(‘home’, ‘work’, etc)

  • :tag - The HTML wrapper element (defaults to :div)

  • Any other passed options will be treated as HTML attributes.

EXAMPLE:

<% vaddress :type => 'work', :id => 'my_adr' do |adr| %>
  I live at <%= adr.street "123 Main St" %>.
<% end %>


36
37
38
39
# File 'lib/helpers.rb', line 36

def vaddress(opts = {}, &block)
  address = Microformats::Address.new(self)
  address.run(opts, &block)
end