class Rack::Router::PathPart
Attributes
constraint[R]
Public Class Methods
new(constraint)
click to toggle source
# File lib/rack/router/path_part.rb, line 6 def initialize(constraint) @constraint = constraint end
Public Instance Methods
==(str)
click to toggle source
# File lib/rack/router/path_part.rb, line 10 def ==(str) return true if constraint.nil? !!constraint.call(str) rescue TypeError, ArgumentError false end