class Pliny::Router

Public Instance Methods

version(*versions, &block) click to toggle source

yield to a builder block in which all defined apps will only respond for the given version

# 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