Module: Card::Set::Abstract::BsBadge::HtmlFormat
- Extended by:
- Card::Set::AbstractFormat
- Defined in:
- platypus/tmp/set/gem-defaults/mod024-bootstrap/abstract/bs_badge.rb
Instance Method Summary collapse
-
#badge_haml_opts(count, label, opts) ⇒ Object
-
#labeled_badge(count, label, opts = {}) ⇒ Object
-
#process_badge_opts(count, opts) ⇒ Object
Instance Method Details
#badge_haml_opts(count, label, opts) ⇒ Object
13 14 15 16 17 |
# File 'platypus/tmp/set/gem-defaults/mod024-bootstrap/abstract/bs_badge.rb', line 13 def badge_haml_opts count, label, opts process_badge_opts count, opts { count: count, label: label, klass: opts[:klass], color: opts[:color], title: opts[:title] } end |
#labeled_badge(count, label, opts = {}) ⇒ Object
9 10 11 |
# File 'platypus/tmp/set/gem-defaults/mod024-bootstrap/abstract/bs_badge.rb', line 9 def labeled_badge count, label, opts={} haml :labeled_badge, badge_haml_opts(count, label, opts) end |
#process_badge_opts(count, opts) ⇒ Object
19 20 21 22 23 24 |
# File 'platypus/tmp/set/gem-defaults/mod024-bootstrap/abstract/bs_badge.rb', line 19 def process_badge_opts count, opts if count.try(:zero?) && !opts[:zero_ok] opts[:klass] = [opts[:klass], "disabled-o"].compact.join " " end opts[:color] ||= "light" end |