module Cucumber::RbSupport::RbDsl

def AfterStep(*tag_expressions, &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, &proc)
  RbDsl.register_rb_hook('after_step', tag_expressions, proc)
end