Class: Header::Component

Inherits:
Lookbook::BaseComponent
  • Object
show all
Defined in:
app/components/lookbook/header/component.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(debug_menu: false, project_name: nil, project_logo: nil, **html_attrs) ⇒ Component

Returns a new instance of Component.



5
6
7
8
9
10
# File 'app/components/lookbook/header/component.rb', line 5

def initialize(debug_menu: false, project_name: nil, project_logo: nil, **html_attrs)
  @debug_menu = debug_menu
  @project_logo = 
  @project_name = project_name
  super(**html_attrs)
end

Instance Attribute Details

#project_logoObject (readonly)

Returns the value of attribute project_logo.



3
4
5
# File 'app/components/lookbook/header/component.rb', line 3

def 
  @project_logo
end

#project_nameObject (readonly)

Returns the value of attribute project_name.



3
4
5
# File 'app/components/lookbook/header/component.rb', line 3

def project_name
  @project_name
end

Instance Method Details

#debug_dataObject



16
17
18
# File 'app/components/lookbook/header/component.rb', line 16

def debug_data
  JSON.pretty_generate(Lookbook.debug_data)
end

#landing_pathObject



12
13
14
# File 'app/components/lookbook/header/component.rb', line 12

def landing_path
  helpers.lookbook_landing_path if defined? helpers.lookbook_landing_path
end