Class: Katalyst::Content::FrontendBuilder

Inherits:
Object
  • Object
show all
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.



40
41
42
43
# File 'app/helpers/katalyst/content/frontend_helper.rb', line 40

def initialize(template, item)
  self.template = template
  self.item     = item
end

Instance Attribute Details

#itemObject

Returns the value of attribute item.



36
37
38
# File 'app/helpers/katalyst/content/frontend_helper.rb', line 36

def item
  @item
end

#templateObject

Returns the value of attribute template.



36
37
38
# File 'app/helpers/katalyst/content/frontend_helper.rb', line 36

def template
  @template
end

Instance Method Details

#render(**options, &block) ⇒ Object



45
46
47
48
49
# File 'app/helpers/katalyst/content/frontend_helper.rb', line 45

def render(**options, &block)
   tag, **default_options(**options) do
     :div, &block
  end
end