Class: Katalyst::Content::FrontendBuilder
- Inherits:
-
Object
- Object
- Katalyst::Content::FrontendBuilder
- Includes:
- HtmlAttributes
- Defined in:
- app/helpers/katalyst/content/frontend_helper.rb
Instance Attribute Summary collapse
-
#item ⇒ Object
Returns the value of attribute item.
-
#template ⇒ Object
Returns the value of attribute template.
Instance Method Summary collapse
-
#initialize(template, item) ⇒ FrontendBuilder
constructor
A new instance of FrontendBuilder.
- #render(tag: :div) ⇒ Object
Constructor Details
#initialize(template, item) ⇒ FrontendBuilder
Returns a new instance of FrontendBuilder.
71 72 73 74 |
# File 'app/helpers/katalyst/content/frontend_helper.rb', line 71 def initialize(template, item) self.template = template self.item = item end |
Instance Attribute Details
#item ⇒ Object
Returns the value of attribute item.
67 68 69 |
# File 'app/helpers/katalyst/content/frontend_helper.rb', line 67 def item @item end |
#template ⇒ Object
Returns the value of attribute template.
67 68 69 |
# File 'app/helpers/katalyst/content/frontend_helper.rb', line 67 def template @template end |
Instance Method Details
#render(tag: :div) ⇒ Object
76 77 78 79 80 |
# File 'app/helpers/katalyst/content/frontend_helper.rb', line 76 def render(tag: :div, **, &) update_html_attributes(**) content_tag(tag, **html_attributes, &) end |