Samp

Component Documentation

matestack core component: Samp

Show specs

The HTML <samp> 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 <samp> should have.

# class (optional)

Expects a string with all classes the <samp> should have.

Example 1: Yield a given block

samp id: 'foo', class: 'bar' do
  plain 'Samp example 1' # optional content
end

returns

<samp id="foo" class="bar">
  Samp example 1
</samp>

Example 2: Render options[:text] param

samp id: 'foo', class: 'bar', text: 'Samp example 2'

returns

<samp id="foo" class="bar">
  Samp example 2
</samp>