Sha256: d9351a51a0181a015164834f58ea547db70ce4f2688d4d28ff1e37b752962849
Contents?: true
Size: 501 Bytes
Versions: 1
Compression:
Stored size: 501 Bytes
Contents
module RocketShorts class RoutingConstraints def initialize(options) @version = options[:version] @versions = options[:versions] @default = options[:default] end def matches?(req) puts 'yoyoyo' req.headers['Accept'].match(/#{RocketShorts.header_format}#{@versions}/) # if @versions.present? # @default || # else # @default || req.headers['Accept'].match(/#{RocketShorts.header_format}#{@version}/) # end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
rocket_shorts-0.0.1 | lib/rocket_shorts/routing_constraints.rb |