| Module | ActionView::Helpers::CaptureHelper |
| In: |
lib/haml/helpers/action_view_mods.rb
|
| capture | -> | capture_without_haml |
| capture_erb_with_buffer | -> | capture_erb_with_buffer_without_haml |
# File lib/haml/helpers/action_view_mods.rb, line 61
61: def capture_erb_with_buffer_with_haml(buffer, *args, &block)
62: if is_haml?
63: capture_haml(*args, &block)
64: else
65: capture_erb_with_buffer_without_haml(buffer, *args, &block)
66: end
67: end
# File lib/haml/helpers/action_view_mods.rb, line 85
85: def capture_with_haml(*args, &block)
86: if Haml::Helpers.block_is_haml?(block)
87: capture_haml(*args, &block)
88: else
89: capture_without_haml(*args, &block)
90: end
91: end
# File lib/haml/helpers/action_view_mods.rb, line 46
46: def capture_with_haml(*args, &block)
47: # Rails' #capture helper will just return the value of the block
48: # if it's not actually in the template context,
49: # as detected by the existance of an _erbout variable.
50: # We've got to do the same thing for compatibility.
51:
52: if is_haml? && block_is_haml?(block)
53: capture_haml(*args, &block)
54: else
55: capture_without_haml(*args, &block)
56: end
57: end