Regin

Constants

Version
POSIX_BRACKET_TYPES

Public Class Methods

compile(source) click to toggle source

Recompiles Regexp by parsing it and turning it back into a Regexp.

(In the future Regin will perform some Regexp optimizations such as removing unnecessary captures and options)

    # File lib/rack/mount/vendor/regin/regin.rb, line 70
70:   def self.compile(source)
71:     regexp = Regexp.compile(source)
72:     expression = parse(regexp)
73:     Regexp.compile(expression.to_s(true), expression.flags)
74:   end
parse(regexp) click to toggle source

Parses Regexp and returns a Expression data structure.

    # File lib/rack/mount/vendor/regin/regin.rb, line 62
62:   def self.parse(regexp)
63:     Parser.parse_regexp(regexp)
64:   end
regexp_supports_named_captures?() click to toggle source

Returns true if the interpreter is using the Oniguruma Regexp lib and supports named captures.

  /(?<foo>bar)/
    # File lib/rack/mount/vendor/regin/regin.rb, line 22
22:     def self.regexp_supports_named_captures?
23:       true
24:     end
supported_posix_bracket_types() click to toggle source

Returns array of supported POSX bracket types

    # File lib/rack/mount/vendor/regin/regin.rb, line 41
41:   def self.supported_posix_bracket_types
42:     @supported_posix_bracket_types ||= []
43:   end

Disabled; run with --debug to generate this.

[Validate]

Generated with the Darkfish Rdoc Generator 1.1.6.