Module: MarkupHelpers::TiltHelpers
- Included in:
- MarkupHelpers
- Defined in:
- lib/markup_helpers/tilt.rb
Instance Method Summary collapse
Instance Method Details
#capture(&block) ⇒ Object
16 17 18 19 20 21 22 23 24 25 |
# File 'lib/markup_helpers/tilt.rb', line 16 def capture &block case @__tilt_context when Tilt::ErubisTemplate, Tilt::ERBTemplate erb_capture &block when Tilt::HamlTemplate capture_haml &block else yield end end |
#concat(content) ⇒ Object
27 28 29 30 31 32 33 34 35 36 |
# File 'lib/markup_helpers/tilt.rb', line 27 def concat content case @__tilt_context when Tilt::ErubisTemplate, Tilt::ERBTemplate erb_buffer << content when Tilt::HamlTemplate haml_concat content else content end end |