class NfgUi::Bootstrap::Components::CardHeader

Bootstrap Card Header getbootstrap.com/docs/4.1/components/card/#header-and-footer

Public Instance Methods

component_family() click to toggle source
# File lib/nfg_ui/bootstrap/components/card_header.rb, line 9
def component_family
  :card
end
heading() click to toggle source
# File lib/nfg_ui/bootstrap/components/card_header.rb, line 13
def heading
  options.fetch(:heading, nil)
end
render() { |: body)| ... } click to toggle source
# File lib/nfg_ui/bootstrap/components/card_header.rb, line 17
def render
  super do
    if heading.present?
      heading
    else
      (block_given? ? yield : body)
    end
  end
end

Private Instance Methods

non_html_attribute_options() click to toggle source
# File lib/nfg_ui/bootstrap/components/card_header.rb, line 29
def non_html_attribute_options
  super.push(:heading)
end