instance method json_regexp

Ruby on Rails 4.2.9

Since v4.0.13 Last seen in v4.2.9

Available in: v4.0.13 v4.1.16 v4.2.9

Signature

json_regexp()

No documentation comment.

Source
# File actionpack/lib/action_dispatch/routing/inspector.rb, line 35
      def json_regexp
        str = regexp.inspect.
              sub('\\A' , '^').
              sub('\\Z' , '$').
              sub('\\z' , '$').
              sub(/^\// , '').
              sub(/\/[a-z]*$/ , '').
              gsub(/\(\?#.+\)/ , '').
              gsub(/\(\?-\w+:/ , '(').
              gsub(/\s/ , '')
        Regexp.new(str).source
      end

Defined in actionpack/lib/action_dispatch/routing/inspector.rb line 35 · View on GitHub · Improve this page · Find usages on GitHub

Defined in ActionDispatch::Routing::RouteWrapper

Type at least 2 characters to search.

↑↓ navigate · open · esc close