Class: AblyUi::Core::MeganavItemsDesktop

Inherits:
ViewComponent::Base
  • Object
show all
Includes:
MeganavConfig, Util
Defined in:
lib/ably_ui/core/meganav_items_desktop/meganav_items_desktop.rb

Constant Summary

Constants included from Util

Util::DEFAULT_URL_BASE

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Util

#abs_url, #append_random_postfix

Methods included from MeganavConfig

#panels, #theme, #theme_setup, #themes

Constructor Details

#initialize(theme_name:, url_base:) ⇒ MeganavItemsDesktop

Returns a new instance of MeganavItemsDesktop.



9
10
11
12
# File 'lib/ably_ui/core/meganav_items_desktop/meganav_items_desktop.rb', line 9

def initialize(theme_name:, url_base:)
  @theme_name = theme_name
  @url_base = url_base
end

Instance Attribute Details

#url_baseObject (readonly)

Returns the value of attribute url_base.



7
8
9
# File 'lib/ably_ui/core/meganav_items_desktop/meganav_items_desktop.rb', line 7

def url_base
  @url_base
end

Instance Method Details

#bg_css(panel_id) ⇒ Object



14
15
16
17
18
19
20
# File 'lib/ably_ui/core/meganav_items_desktop/meganav_items_desktop.rb', line 14

def bg_css(panel_id)
  if %w[platform-panel use-cases-panel].include?(panel_id)
    'ui-meganav-panel-split-bg'
  else
    ''
  end
end