class Ashikawa::Core::XArangoVersion
Sets the ArangoDB API compatibility header
Constants
- HEADER
The name of the x-arango-version header field
Public Class Methods
new(app)
click to toggle source
Initializes the middleware
@param [Callable] app The faraday app
Calls superclass method
# File lib/ashikawa-core/x_arango_version.rb, line 12 def initialize(app) super(app) end
Public Instance Methods
call(env)
click to toggle source
Sets the ‘x-arango-version` for each request
# File lib/ashikawa-core/x_arango_version.rb, line 17 def call(env) env[:request_headers][HEADER] = Ashikawa::Core.api_compatibility_version @app.call(env) end