Module: Rack::Reducer::Warnings
- Defined in:
- lib/rack/reducer/warnings.rb
Constant Summary collapse
- MESSAGES =
{ new: [ 'Rack::Reducer.new will become an alias of ::create in v2.', 'To mount middleware that will still work in 2.0, write', '"use Rack::Reducer::Middleware" instead of "use Rack::Reducer"', ], reduces: [ 'Rack::Reducer’s mixin-style is deprecated and may be removed in v2.', 'To keep using Rack::Reducer in your models, use a Reducer constant.', 'class MyModel', ' MyReducer = Rack::Reducer.create(dataset, *filter_functions)', 'end', 'MyModel::MyReducer.call(params)', ] }.freeze
Class Method Summary collapse
Class Method Details
.[](key) ⇒ Object
22 23 24 |
# File 'lib/rack/reducer/warnings.rb', line 22 def self.[](key) MESSAGES.fetch(key, []).join("\n") end |