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
-
#data_id ⇒ Object
readonly
Returns the value of attribute data_id.
-
#gradient_id_0 ⇒ Object
readonly
Returns the value of attribute gradient_id_0.
-
#gradient_id_1 ⇒ Object
readonly
Returns the value of attribute gradient_id_1.
-
#href ⇒ Object
readonly
Returns the value of attribute href.
Instance Method Summary collapse
-
#initialize(data_id: '', href:) ⇒ Logo
constructor
A new instance of Logo.
- #logo_href ⇒ Object
Methods included from MeganavConfig
#panels, #theme, #theme_setup, #themes
Constructor Details
#initialize(data_id: '', href:) ⇒ Logo
Returns a new instance of Logo.
10 11 12 13 14 15 |
# File 'lib/ably_ui/core/logo/logo.rb', line 10 def initialize(data_id: '', href:) @data_id = data_id @href = href @gradient_id_0 = "paint_linear_#{SecureRandom.uuid}" @gradient_id_1 = "paint_linear_#{SecureRandom.uuid}" end |
Instance Attribute Details
#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 |
#gradient_id_0 ⇒ Object (readonly)
Returns the value of attribute gradient_id_0.
8 9 10 |
# File 'lib/ably_ui/core/logo/logo.rb', line 8 def gradient_id_0 @gradient_id_0 end |
#gradient_id_1 ⇒ Object (readonly)
Returns the value of attribute gradient_id_1.
8 9 10 |
# File 'lib/ably_ui/core/logo/logo.rb', line 8 def gradient_id_1 @gradient_id_1 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 |
Instance Method Details
#logo_href ⇒ Object
17 18 19 |
# File 'lib/ably_ui/core/logo/logo.rb', line 17 def logo_href href.blank? ? '/' : href end |