Sha256: fe9e0ee1bf10e07d28e47ab8901d94f1596d330e29d6c84d9a861a5e6c9b6200
Contents?: true
Size: 481 Bytes
Versions: 18
Compression:
Stored size: 481 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
18 entries across 18 versions & 2 rubygems