class Sinatra::Base
Public Class Methods
subdomain(pattern)
click to toggle source
Adapted from here: toms-toolbox.com/2010/04/sinatra-native-subdomain-routing/
# File lib/sinatra-subroutes.rb, line 27 def subdomain(pattern) condition { if request.subdomains[0] =~ pattern true else false end } end