Class: Fidelity::Widget::Navbar::Item
- Inherits:
-
Object
- Object
- Fidelity::Widget::Navbar::Item
- Defined in:
- app/fidelity/widgets/navbar/navbar.rb
Instance Attribute Summary collapse
-
#content ⇒ Object
Returns the value of attribute content.
-
#label ⇒ Object
Returns the value of attribute label.
-
#type ⇒ Object
Returns the value of attribute type.
Instance Method Summary collapse
- #flyout? ⇒ Boolean
-
#initialize(type = :default, label = 'Item', content = '') ⇒ Item
constructor
A new instance of Item.
- #item? ⇒ Boolean
- #link? ⇒ Boolean
Constructor Details
#initialize(type = :default, label = 'Item', content = '') ⇒ Item
Returns a new instance of Item.
41 42 43 44 45 |
# File 'app/fidelity/widgets/navbar/navbar.rb', line 41 def initialize type=:default, label='Item', content='' @type = type @label = label || content @content = content end |
Instance Attribute Details
#content ⇒ Object
Returns the value of attribute content.
40 41 42 |
# File 'app/fidelity/widgets/navbar/navbar.rb', line 40 def content @content end |
#label ⇒ Object
Returns the value of attribute label.
40 41 42 |
# File 'app/fidelity/widgets/navbar/navbar.rb', line 40 def label @label end |
#type ⇒ Object
Returns the value of attribute type.
40 41 42 |
# File 'app/fidelity/widgets/navbar/navbar.rb', line 40 def type @type end |
Instance Method Details
#flyout? ⇒ Boolean
55 56 57 |
# File 'app/fidelity/widgets/navbar/navbar.rb', line 55 def flyout? @type == :flyout end |
#item? ⇒ Boolean
47 48 49 |
# File 'app/fidelity/widgets/navbar/navbar.rb', line 47 def item? @type == :default end |
#link? ⇒ Boolean
51 52 53 |
# File 'app/fidelity/widgets/navbar/navbar.rb', line 51 def link? @type == :link end |