Module: Silencer::Methods

Included in:
Rack::Logger, Rails::Logger
Defined in:
lib/silencer/methods.rb

Constant Summary collapse

METHODS =
%i[options get head post put delete trace connect patch]

Instance Method Summary collapse

Instance Method Details

#define_routes(silence_paths, opts) ⇒ Object



7
8
9
10
11
12
# File 'lib/silencer/methods.rb', line 7

def define_routes(silence_paths, opts)
  METHODS.each_with_object({}) do |method, routes|
    routes[method.to_s.upcase] = wrap(opts.delete(method)) + silence_paths
    routes
  end
end