module Cucumber::Glue::Dsl

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

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