Module: Htmless::Helper
- Included in:
- Rails::AbstractBuilder
- Defined in:
- lib/htmless/helper.rb
Instance Method Summary (collapse)
-
- (Object) builder(method_name) {|self| ... }
adds instance method to the class.
Instance Method Details
- (Object) builder(method_name) {|self| ... }
adds instance method to the class. Method accepts any instance of builder and returns it after rendering.
18 19 20 21 22 |
# File 'lib/htmless/helper.rb', line 18 def builder(method_name, &builder_block) define_method(method_name) do |builder, *args| builder.dive(self, *args, &builder_block) end end |