Class: Alchemy::Admin::LinkDialog::Tabs
- Inherits:
-
ViewComponent::Base
- Object
- ViewComponent::Base
- Alchemy::Admin::LinkDialog::Tabs
- Defined in:
- app/components/alchemy/admin/link_dialog/tabs.rb
Instance Method Summary collapse
-
#initialize(**options) ⇒ Tabs
constructor
A new instance of Tabs.
- #is_selected?(tab) ⇒ Boolean
- #tabs ⇒ Object
Constructor Details
#initialize(**options) ⇒ Tabs
Returns a new instance of Tabs.
15 16 17 18 19 20 21 |
# File 'app/components/alchemy/admin/link_dialog/tabs.rb', line 15 def initialize(**) .symbolize_keys! @url = [:url] @selected_tab = [:selected_tab] @link_title = [:link_title] @link_target = [:link_target] end |
Instance Method Details
#is_selected?(tab) ⇒ Boolean
23 24 25 |
# File 'app/components/alchemy/admin/link_dialog/tabs.rb', line 23 def is_selected?(tab) @selected_tab&.to_sym == tab.panel_name end |
#tabs ⇒ Object
27 28 29 |
# File 'app/components/alchemy/admin/link_dialog/tabs.rb', line 27 def tabs Alchemy.link_dialog_tabs end |