Sha256: 9a1c00d60ae6c73e11e588cd512222197e212121d3f7bf8feba1b107394b384f
Contents?: true
Size: 445 Bytes
Versions: 1
Compression:
Stored size: 445 Bytes
Contents
module DiviningRod class Matchers class << self def ua(pattern, opts = {}) Definition.new(opts) { |request| if pattern.match(request.user_agent) true end } end def subdomain(pattern, opts={}) Definition.new(opts) { |request| if pattern.match(request.subdomains[0]) true end } end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
divining_rod-0.4.0 | lib/divining_rod/matchers.rb |