W3cubDocs

/Padrino

Class: Padrino::PathRouter::Matcher

Inherits:
Object
  • Object

Constant Summary

GROUP_REGEXP =

To count group of regexp

%r{\((?!\?:|\?!|\?<=|\?<!|\?=).+?\)}.freeze

Instance Method Summary

Constructor Details

#initialize(path, options = {}) ⇒ Matcher

Constructs an instance of PathRouter::Matcher.

Instance Method Details

#capture_length ⇒ Object

Returns captures parameter length.

#expand(params) ⇒ Object

Expands the path by using parameters.

#handler ⇒ Object

Returns the handler which is an instance of Mustermann or Regexp.

#match(pattern) ⇒ Object

Matches a pattern with the route matcher.

#mustermann? ⇒ Boolean

Returns true if handler is an instance of Mustermann.

Returns:

  • (Boolean)

#names ⇒ Object

Returns names of the handler.

See Also:

  • Regexp#names

#params_for(pattern, others) ⇒ Object

Builds a parameters, and returns them.

#to_regexp ⇒ Object

Returns a regexp from handler.

#to_s ⇒ Object

Converts the handler into string.

© 2010–2016 Padrino
Licensed under the MIT License.
http://www.rubydoc.info/github/padrino/padrino-framework/Padrino/PathRouter/Matcher