Sha256: a4e8f95ff8a639842481636851c0be513ba0ba767526e063a922b90c34d121d7
Contents?: true
Size: 479 Bytes
Versions: 10
Compression:
Stored size: 479 Bytes
Contents
module Grape module Middleware # This is a simple middleware for adding before and after filters # to Grape APIs. It is used like so: # # use Grape::Middleware::Filter, before: lambda { do_something }, after: lambda { do_something } class Filter < Base def before app.instance_eval(&options[:before]) if options[:before] end def after app.instance_eval(&options[:after]) if options[:after] end end end end
Version data entries
10 entries across 10 versions & 2 rubygems