Module: Bridgetown::Streamlined

Includes:
ERBCapture, Serbea::Pipeline::Helper, Streamlined::Renderable
Included in:
Component, RubyTemplateView
Defined in:
bridgetown-core/lib/bridgetown-core/ruby_template_view.rb

Instance Method Summary collapse

Methods included from ERBCapture

#capture

Instance Method Details

#helper(name, &helper_block) ⇒ Object Also known as: macro



14
15
16
17
18
# File 'bridgetown-core/lib/bridgetown-core/ruby_template_view.rb', line 14

def helper(name, &helper_block)
  self.class.define_method(name) do |*args, **kwargs, &block|
    helper_block.call(*args, **kwargs, &block)
  end
end