Module: NitroKit::BadgeHelper

Includes:
Variants
Defined in:
app/helpers/nitro_kit/badge_helper.rb

Instance Method Summary collapse

Methods included from Variants

included

Instance Method Details

#nk_badge(text = nil, **attrs, &block) ⇒ Object



7
8
9
10
11
12
13
# File 'app/helpers/nitro_kit/badge_helper.rb', line 7

def nk_badge(text = nil, **attrs, &block)
  content = text || capture(&block)

  render(NitroKit::Badge.new(**attrs)) do
    content
  end
end