Class: LesliView::Components::Header
- Inherits:
-
ViewComponent::Base
- Object
- ViewComponent::Base
- LesliView::Components::Header
- Defined in:
- lib/lesli_view/components/header.rb
Instance Attribute Summary collapse
-
#back ⇒ Object
readonly
Returns the value of attribute back.
-
#new_path ⇒ Object
readonly
Returns the value of attribute new_path.
-
#subtitle ⇒ Object
readonly
Returns the value of attribute subtitle.
-
#title ⇒ Object
readonly
Returns the value of attribute title.
Instance Method Summary collapse
-
#initialize(title, subtitle = "", new_path: nil, back: nil) ⇒ Header
constructor
A new instance of Header.
Constructor Details
#initialize(title, subtitle = "", new_path: nil, back: nil) ⇒ Header
Returns a new instance of Header.
40 41 42 43 44 45 |
# File 'lib/lesli_view/components/header.rb', line 40 def initialize(title, subtitle="", new_path:nil, back:nil) @title = title @subtitle = subtitle @back = back @new_path = new_path end |
Instance Attribute Details
#back ⇒ Object (readonly)
Returns the value of attribute back.
38 39 40 |
# File 'lib/lesli_view/components/header.rb', line 38 def back @back end |
#new_path ⇒ Object (readonly)
Returns the value of attribute new_path.
38 39 40 |
# File 'lib/lesli_view/components/header.rb', line 38 def new_path @new_path end |
#subtitle ⇒ Object (readonly)
Returns the value of attribute subtitle.
38 39 40 |
# File 'lib/lesli_view/components/header.rb', line 38 def subtitle @subtitle end |
#title ⇒ Object (readonly)
Returns the value of attribute title.
38 39 40 |
# File 'lib/lesli_view/components/header.rb', line 38 def title @title end |