Class: Header::Component
- Inherits:
-
Lookbook::BaseComponent
- Object
- Lookbook::BaseComponent
- Header::Component
- Defined in:
- app/components/lookbook/header/component.rb
Instance Attribute Summary collapse
-
#project_logo ⇒ Object
readonly
Returns the value of attribute project_logo.
-
#project_name ⇒ Object
readonly
Returns the value of attribute project_name.
Instance Method Summary collapse
- #debug_data ⇒ Object
-
#initialize(debug_menu: false, project_name: nil, project_logo: nil, **html_attrs) ⇒ Component
constructor
A new instance of Component.
- #landing_path ⇒ Object
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 = @project_logo = project_logo @project_name = project_name super(**html_attrs) end |
Instance Attribute Details
#project_logo ⇒ Object (readonly)
Returns the value of attribute project_logo.
3 4 5 |
# File 'app/components/lookbook/header/component.rb', line 3 def project_logo @project_logo end |
#project_name ⇒ Object (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_data ⇒ Object
16 17 18 |
# File 'app/components/lookbook/header/component.rb', line 16 def debug_data JSON.pretty_generate(Lookbook.debug_data) end |
#landing_path ⇒ Object
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 |