lib/router/tree/action/matcher.rb
# Attempt to match the argument to the given request, handling
# common ruby types.
Attempt to match the argument to the given request, handling
common ruby types.
Attempt to match the argument to the given request handling common ruby types .
def match(matcher)
          case matcher
          when String
            _match_string(matcher)
          when Class
            _match_class(matcher)
          when TERM
            empty_path?
          when Regexp
            _match_regexp(matcher)
          when true
            matcher
          when Array
            _match_array(matcher)
          when Hash
            _match_hash(matcher)
          when Symbol
            _match_symbol(matcher)
          when false, nil
            matcher
          when Proc
            matcher.call
          else
            unsupported_matcher(matcher)
          end
        end
def match ( matcher ) case matcher when String _match_string ( matcher ) when Class _match_class ( matcher ) when TERM empty_path? when Regexp _match_regexp ( matcher ) when true matcher when Array _match_array ( matcher ) when Hash _match_hash ( matcher ) when Symbol _match_symbol ( matcher ) when false , nil matcher when Proc matcher . call else unsupported_matcher ( matcher ) end end
Attempt to match the argument to the given request, handling
common ruby types.
Attempt to match the argument to the given request handling common ruby types .
matcher