Method: Pliny::Router#version
- Defined in:
- lib/pliny/router.rb
#version(*versions, &block) ⇒ Object
yield to a builder block in which all defined apps will only respond for the given version
8 9 10 11 12 13 |
# File 'lib/pliny/router.rb', line 8 def version(*versions, &block) condition = lambda { |env| versions.include?(env["HTTP_X_API_VERSION"]) } with_conditions(condition, &block) end |