Module: Fortitude::Widget::Capturing

Extended by:
ActiveSupport::Concern
Included in:
Fortitude::Widget
Defined in:
lib/fortitude/widget/capturing.rb

Instance Method Summary collapse

Instance Method Details

#capture(&block) ⇒ Object

PUBLIC API


10
11
12
13
14
15
16
17
18
# File 'lib/fortitude/widget/capturing.rb', line 10

def capture(&block)
  helpers = @_fortitude_rendering_context.helpers_object
  if helpers && helpers.respond_to?(:capture, true) &&
    [ 0, -1 ].include?(helpers.method(:capture).arity)
    helpers.capture(&block)
  else
    _fortitude_builtin_capture(&block)
  end
end