Class: Olivander::Menus::Badge
- Inherits:
-
Object
- Object
- Olivander::Menus::Badge
- Defined in:
- lib/olivander/menus/menu_item.rb
Instance Attribute Summary collapse
-
#badge_class ⇒ Object
Returns the value of attribute badge_class.
-
#text ⇒ Object
Returns the value of attribute text.
Instance Method Summary collapse
-
#initialize(text = nil, badge_class = nil) ⇒ Badge
constructor
A new instance of Badge.
- #with_proc {|_self| ... } ⇒ Object
Constructor Details
#initialize(text = nil, badge_class = nil) ⇒ Badge
Returns a new instance of Badge.
92 93 94 95 |
# File 'lib/olivander/menus/menu_item.rb', line 92 def initialize(text = nil, badge_class = nil) @text = text @badge_class = badge_class end |
Instance Attribute Details
#badge_class ⇒ Object
Returns the value of attribute badge_class.
90 91 92 |
# File 'lib/olivander/menus/menu_item.rb', line 90 def badge_class @badge_class end |
#text ⇒ Object
Returns the value of attribute text.
90 91 92 |
# File 'lib/olivander/menus/menu_item.rb', line 90 def text @text end |
Instance Method Details
#with_proc {|_self| ... } ⇒ Object
97 98 99 100 |
# File 'lib/olivander/menus/menu_item.rb', line 97 def with_proc yield(self) self end |