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(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_idObject (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_0Object (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_1Object (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

#hrefObject (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_hrefObject



17
18
19
# File 'lib/ably_ui/core/logo/logo.rb', line 17

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