Class: AblyUi::Core::Logo
- Inherits:
-
ViewComponent::Base
- Object
- ViewComponent::Base
- AblyUi::Core::Logo
- Includes:
- MeganavConfig
- Defined in:
- lib/ably_ui/core/logo/logo.rb
Instance Attribute Summary collapse
-
#additional_img_attrs ⇒ Object
readonly
Returns the value of attribute additional_img_attrs.
-
#additional_link_attrs ⇒ Object
readonly
Returns the value of attribute additional_link_attrs.
-
#data_id ⇒ Object
readonly
Returns the value of attribute data_id.
-
#href ⇒ Object
readonly
Returns the value of attribute href.
-
#logo_url ⇒ Object
readonly
Returns the value of attribute logo_url.
Instance Method Summary collapse
-
#initialize(href:, logo_url:, data_id: '', additional_img_attrs: {}, additional_link_attrs: {}) ⇒ Logo
constructor
A new instance of Logo.
- #logo_href ⇒ Object
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.
10 11 12 13 14 15 16 |
# File 'lib/ably_ui/core/logo/logo.rb', line 10 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_attrs ⇒ Object (readonly)
Returns the value of attribute additional_img_attrs.
8 9 10 |
# File 'lib/ably_ui/core/logo/logo.rb', line 8 def additional_img_attrs @additional_img_attrs end |
#additional_link_attrs ⇒ Object (readonly)
Returns the value of attribute additional_link_attrs.
8 9 10 |
# File 'lib/ably_ui/core/logo/logo.rb', line 8 def additional_link_attrs @additional_link_attrs end |
#data_id ⇒ Object (readonly)
Returns the value of attribute data_id.
8 9 10 |
# File 'lib/ably_ui/core/logo/logo.rb', line 8 def data_id @data_id end |
#href ⇒ Object (readonly)
Returns the value of attribute href.
8 9 10 |
# File 'lib/ably_ui/core/logo/logo.rb', line 8 def href @href end |
#logo_url ⇒ Object (readonly)
Returns the value of attribute logo_url.
8 9 10 |
# File 'lib/ably_ui/core/logo/logo.rb', line 8 def logo_url @logo_url end |
Instance Method Details
#logo_href ⇒ Object
18 19 20 |
# File 'lib/ably_ui/core/logo/logo.rb', line 18 def logo_href href.blank? ? '/' : href end |