Module: Grape::Middleware::Versioner
- Defined in:
- lib/grape/middleware/versioner.rb,
lib/grape/middleware/versioner/path.rb,
lib/grape/middleware/versioner/param.rb,
lib/grape/middleware/versioner/header.rb,
lib/grape/middleware/versioner/accept_version_header.rb
Defined Under Namespace
Classes: AcceptVersionHeader, Header, Param, Path
Class Method Summary collapse
-
.using(strategy) ⇒ Object
A middleware class based on strategy.
Class Method Details
.using(strategy) ⇒ Object
Returns a middleware class based on strategy.
18 19 20 21 22 |
# File 'lib/grape/middleware/versioner.rb', line 18 def using(strategy) Grape::Middleware::Versioner.const_get(:"#{strategy.to_s.camelize}") rescue NameError raise Grape::Exceptions::InvalidVersionerOption, strategy end |