Class: ActiveElement::Components::PageDescription

Inherits:
Object
  • Object
show all
Defined in:
lib/active_element/components/page_description.rb

Overview

Provides a description of a page, intended to be used underneath the ‘page_title` component.

Instance Method Summary collapse

Constructor Details

#initialize(controller, content:) ⇒ PageDescription

Returns a new instance of PageDescription.



7
8
9
10
# File 'lib/active_element/components/page_description.rb', line 7

def initialize(controller, content:)
  @controller = controller
  @content = content
end

Instance Method Details

#localsObject



16
17
18
19
20
21
# File 'lib/active_element/components/page_description.rb', line 16

def locals
  {
    component: self,
    content: content
  }
end

#templateObject



12
13
14
# File 'lib/active_element/components/page_description.rb', line 12

def template
  'active_element/components/page_description'
end