module Grape::DSL::Callbacks::ClassMethods

def after(&block)

Execute the given block after the endpoint code has run.
def after(&block)
  namespace_stackable(:afters, block)
end

def after_validation(&block)

any endpoint code.
Execute the given block after validations and coercions, but before
def after_validation(&block)
  namespace_stackable(:after_validations, block)
end

def before(&block)

code is executed.
Execute the given block before validation, coercion, or any endpoint
def before(&block)
  namespace_stackable(:befores, block)
end

def before_validation(&block)

coercion.
Execute the given block after `before`, but prior to validation or
def before_validation(&block)
  namespace_stackable(:before_validations, block)
end

def finally(&block)

Parameters:
  • ensured_block (Proc) -- The block to be executed after every api_call
def finally(&block)
  namespace_stackable(:finallies, block)
end