@h = h @size = options.fetch(:size, 'normal') end # <div class='card card-‐-‐[size]'> # [block contents] # </div> def render(&block) h.content_tag('div', class: css_classes, &block) end # <h2 class='card__header'>[text]</h2> def header(text) h.content_tag('h2', text, class: 'card__header') end end initialization render shell sub-renderers