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(href:, logo_url:, data_id: '', additional_img_attrs: {}, additional_link_attrs: {}) ⇒ Logo

Returns a new instance of Logo.



12
13
14
15
16
17
18
19
20
21
22
23
24
# File 'lib/ably_ui/core/logo/logo.rb', line 12

def initialize(
  href:,
  logo_url:,
  data_id: '',
  additional_img_attrs: {},
  additional_link_attrs: {}
)
  @data_id = data_id
  @href = href
  @logo_url = logo_url
  @additional_img_attrs = additional_img_attrs
  @additional_link_attrs = additional_link_attrs
end

Instance Attribute Details

#additional_img_attrsObject (readonly)

Returns the value of attribute additional_img_attrs.



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

def additional_img_attrs
  @additional_img_attrs
end

Returns the value of attribute additional_link_attrs.



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

def additional_link_attrs
  @additional_link_attrs
end

#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

#logo_urlObject (readonly)

Returns the value of attribute logo_url.



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

def logo_url
  @logo_url
end

Instance Method Details

#logo_hrefObject



26
27
28
# File 'lib/ably_ui/core/logo/logo.rb', line 26

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