Class: AblyUi::Core::Meganav
- Inherits:
-
ViewComponent::Base
- Object
- ViewComponent::Base
- AblyUi::Core::Meganav
- Includes:
- MeganavConfig, Util
- Defined in:
- lib/ably_ui/core/meganav/meganav.rb
Constant Summary
Constants included from Util
Instance Attribute Summary collapse
-
#login_link ⇒ Object
readonly
Returns the value of attribute login_link.
-
#logo_link ⇒ Object
readonly
Returns the value of attribute logo_link.
-
#options ⇒ Object
readonly
Returns the value of attribute options.
-
#url_base ⇒ Object
readonly
Returns the value of attribute url_base.
Instance Method Summary collapse
-
#initialize(session_data: {}, theme_name: :white, login_link: '/login', logo_link: '', url_base: AblyUi::Core::Util::DEFAULT_URL_BASE) ⇒ Meganav
constructor
A new instance of Meganav.
- #panels ⇒ Object
Methods included from Util
#abs_url, #append_random_postfix
Methods included from MeganavConfig
Constructor Details
#initialize(session_data: {}, theme_name: :white, login_link: '/login', logo_link: '', url_base: AblyUi::Core::Util::DEFAULT_URL_BASE) ⇒ Meganav
Returns a new instance of Meganav.
13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 |
# File 'lib/ably_ui/core/meganav/meganav.rb', line 13 def initialize( session_data: {}, theme_name: :white, login_link: '/login', logo_link: '', url_base: AblyUi::Core::Util::DEFAULT_URL_BASE ) @session_data = session_data @theme_name = theme_name @options = @login_link = login_link @url_base = url_base @logo_link = logo_link || url_base theme_setup(theme_name) end |
Instance Attribute Details
#login_link ⇒ Object (readonly)
Returns the value of attribute login_link.
9 10 11 |
# File 'lib/ably_ui/core/meganav/meganav.rb', line 9 def login_link @login_link end |
#logo_link ⇒ Object (readonly)
Returns the value of attribute logo_link.
9 10 11 |
# File 'lib/ably_ui/core/meganav/meganav.rb', line 9 def logo_link @logo_link end |
#options ⇒ Object (readonly)
Returns the value of attribute options.
9 10 11 |
# File 'lib/ably_ui/core/meganav/meganav.rb', line 9 def @options end |
#url_base ⇒ Object (readonly)
Returns the value of attribute url_base.
9 10 11 |
# File 'lib/ably_ui/core/meganav/meganav.rb', line 9 def url_base @url_base end |
Instance Method Details
#panels ⇒ Object
29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 |
# File 'lib/ably_ui/core/meganav/meganav.rb', line 29 def panels [ { label: 'Platform', id: 'platform-panel', class: 'AblyUi::Core::MeganavContentPlatform' }, { label: 'Use Cases', id: 'use-cases-panel', class: 'AblyUi::Core::MeganavContentUseCases' }, { label: 'Why Ably', id: 'why-ably-panel', class: 'AblyUi::Core::MeganavContentWhyAbly' }, { label: 'Developers', id: 'developers-panel', class: 'AblyUi::Core::MeganavContentDevelopers' } ] end |