Module: Regin

### Home Classes Methods

### In Files

- lib/rack/mount/vendor/regin/regin/alternation.rb
- lib/rack/mount/vendor/regin/regin/anchor.rb
- lib/rack/mount/vendor/regin/regin/atom.rb
- lib/rack/mount/vendor/regin/regin/character.rb
- lib/rack/mount/vendor/regin/regin/character_class.rb
- lib/rack/mount/vendor/regin/regin/collection.rb
- lib/rack/mount/vendor/regin/regin/expression.rb
- lib/rack/mount/vendor/regin/regin/group.rb
- lib/rack/mount/vendor/regin/regin/options.rb
- lib/rack/mount/vendor/regin/regin/parser.rb
- lib/rack/mount/vendor/regin/regin/version.rb
- lib/rack/mount/vendor/regin/regin.rb

### Namespace

- CLASS Regin::Alternation
- CLASS Regin::Anchor
- CLASS Regin::Atom
- CLASS Regin::Character
- CLASS Regin::CharacterClass
- CLASS Regin::Collection
- CLASS Regin::Expression
- CLASS Regin::Group
- CLASS Regin::Options
- CLASS Regin::Parser

### Methods

- ::compile
- ::parse
- ::regexp_supports_named_captures?
- ::supported_posix_bracket_types

### Class/Module Index

Quicksearch

- Rack
- Rack::Mount
- Rack::Mount::Analysis
- Rack::Mount::Analysis::Splitting
- Rack::Mount::Analysis::Splitting::Key
- Rack::Mount::GeneratableRegexp
- Rack::Mount::GeneratableRegexp::InstanceMethods
- Rack::Mount::RegexpWithNamedGroups
- Rack::Mount::Route
- Rack::Mount::RouteSet
- Rack::Mount::RoutingError
- Rack::Mount::Strexp
- Rack::Mount::StrexpParser
- Rack::Mount::StrexpParser::ScanError
- Rack::Mount::Utils
- Regin
- Regin::Alternation
- Regin::Anchor
- Regin::Atom
- Regin::Character
- Regin::CharacterClass
- Regin::Collection
- Regin::Expression
- Regin::Group
- Regin::Options
- Regin::Parser
- Regin::Parser::ScanError

No matching classes.

# Regin

### Constants

POSIX_BRACKET_TYPES
Version

### 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
    def self.compile(source)
      regexp = Regexp.compile(source)
      expression = parse(regexp)
      Regexp.compile(expression.to_s(true), expression.flags)
    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
    def self.parse(regexp)
      Parser.parse_regexp(regexp)
    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
    def self.regexp_supports_named_captures?
      true
    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
    def self.supported_posix_bracket_types
      @supported_posix_bracket_types ||= []
    end

[Validate]

Generated with the Darkfish Rdoc Generator 2.