Method: Fitting::Doc::Action#regexp
- Defined in:
- lib/fitting/doc/action.rb
#regexp ⇒ Object
131 132 133 134 135 136 137 138 |
# File 'lib/fitting/doc/action.rb', line 131 def regexp return @regexp if @regexp str = Regexp.escape(@prefix + path) str = str.gsub(/\\{\w+\\}/, '[^&=\/]+') str = "\\A#{str}\\z" @regexp = Regexp.new(str) end |