Class: Katalyst::Content::FrontendBuilder

Inherits:
Object
  • Object
show all
Includes:
HtmlAttributes
Defined in:
app/helpers/katalyst/content/frontend_helper.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#itemObject

Returns the value of attribute item.



67
68
69
# File 'app/helpers/katalyst/content/frontend_helper.rb', line 67

def item
  @item
end

#templateObject

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(**)

  (tag, **html_attributes, &)
end