Module: KomponentHelper

Defined in:
lib/komponent/komponent_helper.rb

Instance Method Summary collapse

Instance Method Details

#component(component_name, locals = {}, options = {}, &block) ⇒ Object Also known as: c



4
5
6
7
8
9
10
11
12
13
14
# File 'lib/komponent/komponent_helper.rb', line 4

def component(component_name, locals = {}, options = {}, &block)
  captured_block = proc { |args| capture(args, &block) } if block_given?
  Komponent::ComponentRenderer.new(
    controller,
  ).render(
    component_name,
    locals,
    options,
    &captured_block
  )
end