Module: Aladdin::Support::OneOfPattern

Included in:
App
Defined in:
lib/aladdin/support/multiroute.rb

Overview

Sinatra route matcher that matches mutltiple paths given in an array.

Instance Method Summary collapse

Instance Method Details

#one_of(routes) ⇒ Object

Examples:

get one_of(%w(x y z)) do
  puts 'Hello!'
end


32
33
34
# File 'lib/aladdin/support/multiroute.rb', line 32

def one_of(routes)
  OneOfMatcher.new routes
end