Class: Padrino::Helpers::OutputHelpers::ErbHandler
- Inherits:
-
Object
- Object
- Padrino::Helpers::OutputHelpers::ErbHandler
- Defined in:
- lib/middleman-more/core_extensions/default_helpers.rb
Instance Method Summary collapse
-
#capture_from_template(*args, &block) ⇒ Object
Force Erb capture not to use safebuffer rubocop:disable UnderscorePrefixedVariableName.
Instance Method Details
#capture_from_template(*args, &block) ⇒ Object
Force Erb capture not to use safebuffer rubocop:disable UnderscorePrefixedVariableName
10 11 12 13 14 15 16 |
# File 'lib/middleman-more/core_extensions/default_helpers.rb', line 10 def capture_from_template(*args, &block) self.output_buffer, _buf_was = '', output_buffer raw = block.call(*args) captured = template.instance_variable_get(:@_out_buf) self.output_buffer = _buf_was engine_matches?(block) ? captured : raw end |