Class: LesliView::Components::Header

Inherits:
ViewComponent::Base
  • Object
show all
Defined in:
lib/lesli_view/components/header.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#backObject (readonly)

Returns the value of attribute back.



38
39
40
# File 'lib/lesli_view/components/header.rb', line 38

def back
  @back
end

#new_pathObject (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

#subtitleObject (readonly)

Returns the value of attribute subtitle.



38
39
40
# File 'lib/lesli_view/components/header.rb', line 38

def subtitle
  @subtitle
end

#titleObject (readonly)

Returns the value of attribute title.



38
39
40
# File 'lib/lesli_view/components/header.rb', line 38

def title
  @title
end