Class: Alchemy::Ingredients::HeadlineView
- Inherits:
-
BaseView
- Object
- ViewComponent::Base
- BaseView
- Alchemy::Ingredients::HeadlineView
show all
- Defined in:
- app/components/alchemy/ingredients/headline_view.rb
Instance Attribute Summary
Attributes inherited from BaseView
#html_options, #ingredient
Instance Method Summary
collapse
Methods inherited from BaseView
#render?
Constructor Details
#initialize(ingredient, level: nil, html_options: {}) ⇒ HeadlineView
4
5
6
7
|
# File 'app/components/alchemy/ingredients/headline_view.rb', line 4
def initialize(ingredient, level: nil, html_options: {})
super(ingredient, html_options: html_options)
@level = level
end
|
Instance Method Details
#call ⇒ Object
9
10
11
12
13
|
# File 'app/components/alchemy/ingredients/headline_view.rb', line 9
def call
content_tag tag_name, id: dom_id, class: css_classes do
ingredient.value
end.html_safe
end
|