Class: AblyUi::Core::Logo

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from MeganavConfig

#panels, #theme, #theme_setup, #themes

Constructor Details

#initialize(theme_name:, data_id: '', href:) ⇒ Logo

Returns a new instance of Logo.



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

def initialize(theme_name:, data_id: '', href:)
  @data_id = data_id
  @href = href
  theme_setup(theme_name)
end

Instance Attribute Details

#data_idObject (readonly)

Returns the value of attribute data_id.



6
7
8
# File 'lib/ably_ui/core/logo/logo.rb', line 6

def data_id
  @data_id
end

#hrefObject (readonly)

Returns the value of attribute href.



6
7
8
# File 'lib/ably_ui/core/logo/logo.rb', line 6

def href
  @href
end

Instance Method Details

#logo_hrefObject



14
15
16
# File 'lib/ably_ui/core/logo/logo.rb', line 14

def logo_href
  href.blank? ? '/' : href
end