Class: Trestle::Navigation::Item::Badge
- Inherits:
-
Object
- Object
- Trestle::Navigation::Item::Badge
- Defined in:
- lib/trestle/navigation/item.rb
Instance Attribute Summary collapse
-
#text ⇒ Object
readonly
Returns the value of attribute text.
Instance Method Summary collapse
- #html_class ⇒ Object
-
#initialize(options) ⇒ Badge
constructor
A new instance of Badge.
Constructor Details
#initialize(options) ⇒ Badge
Returns a new instance of Badge.
75 76 77 78 79 80 81 82 83 |
# File 'lib/trestle/navigation/item.rb', line 75 def initialize() case when Hash @html_class = [:class] @text = [:text] else @text = end end |
Instance Attribute Details
#text ⇒ Object (readonly)
Returns the value of attribute text.
73 74 75 |
# File 'lib/trestle/navigation/item.rb', line 73 def text @text end |
Instance Method Details
#html_class ⇒ Object
85 86 87 |
# File 'lib/trestle/navigation/item.rb', line 85 def html_class @html_class || "badge-primary" end |