module Cucumber::Glue::Dsl

def After(*tag_expressions, name: nil, &proc)

as you want (typically from ruby scripts under support/hooks.rb).
Registers a proc that will run after each Scenario. You can register as many
def After(*tag_expressions, name: nil, &proc)
  Dsl.register_rb_hook('after', tag_expressions, proc, name: name)
end