Class: JSONRPC::BatchConstraint Private
- Inherits:
-
Object
- Object
- JSONRPC::BatchConstraint
- Defined in:
- lib/jsonrpc/railtie/batch_constraint.rb
Overview
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
This constraint allows Rails routes to be matched based on JSON-RPC batch requests, enabling batch-specific routing to dedicated controllers.
Instance Method Summary collapse
-
#matches?(request) ⇒ Boolean
private
Check if the request is a JSON-RPC batch request.
Instance Method Details
#matches?(request) ⇒ Boolean
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Check if the request is a JSON-RPC batch request
18 19 20 21 22 23 |
# File 'lib/jsonrpc/railtie/batch_constraint.rb', line 18 def matches?(request) jsonrpc_batch = request.env['jsonrpc.batch'] # Return true if we have a batch request in the environment !jsonrpc_batch.nil? end |