Module: Bridgetown::Streamlined
- Includes:
- ERBCapture, Serbea::Pipeline::Helper, Streamlined::Renderable
- Included in:
- Component, RubyTemplateView
- Defined in:
- lib/bridgetown-core/ruby_template_view.rb
Instance Method Summary collapse
- #helper(name, &helper_block) ⇒ Object (also: #macro)
Methods included from ERBCapture
Instance Method Details
#helper(name, &helper_block) ⇒ Object Also known as: macro
14 15 16 17 18 |
# File '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 |