Class: Alchemy::Admin::MainNavigation::Entry
- Inherits:
-
ViewComponent::Base
- Object
- ViewComponent::Base
- Alchemy::Admin::MainNavigation::Entry
- Defined in:
- app/components/alchemy/admin/main_navigation/entry.rb
Instance Attribute Summary collapse
-
#item ⇒ Object
readonly
Returns the value of attribute item.
Instance Method Summary collapse
- #before_render ⇒ Object
-
#initialize(item:) ⇒ Entry
constructor
A new instance of Entry.
- #render? ⇒ Boolean
Constructor Details
#initialize(item:) ⇒ Entry
Returns a new instance of Entry.
33 34 35 |
# File 'app/components/alchemy/admin/main_navigation/entry.rb', line 33 def initialize(item:) @item = item end |
Instance Attribute Details
#item ⇒ Object (readonly)
Returns the value of attribute item.
31 32 33 |
# File 'app/components/alchemy/admin/main_navigation/entry.rb', line 31 def item @item end |
Instance Method Details
#before_render ⇒ Object
37 38 39 |
# File 'app/components/alchemy/admin/main_navigation/entry.rb', line 37 def before_render item.validate_controller_existence! end |
#render? ⇒ Boolean
41 42 43 |
# File 'app/components/alchemy/admin/main_navigation/entry.rb', line 41 def render? item.visible?(helpers) end |