Address

Component Documentation

matestack core component: Address

Show specs

The HTML <address> tag implemented in ruby.

Parameters

This component can take 2 optional configuration params and either yield content or display what gets passed to the text configuration param.

# id (optional)

Expects a string with all ids the address should have.

# class (optional)

Expects a string with all classes the address should have.

# text (optional)

Expects a ruby string with the text the address tag should show.

Example 1 - yield a given block

address do
  plain 'Codey McCodeface'
  br
  plain '1 Developer Avenue'
  br
  plain 'Techville'
end

returns

<address>
  Codey McCodeface<br>
  1 Developer Avenue<br>
  Techville
</address>

Example 2 - render options[:text] param

address text: 'PO Box 12345'

returns

<address>
  PO Box 12345
</address>