Class: Alchemy::Ingredients::HeadlineView

Inherits:
BaseView
  • Object
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

Returns a new instance of 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

#callObject



9
10
11
12
13
# File 'app/components/alchemy/ingredients/headline_view.rb', line 9

def call
   tag_name, id: dom_id, class: css_classes do
    ingredient.value
  end.html_safe
end