Class: Rack::Mount::Analysis::Splitting

### Home Classes Methods

### In Files

- lib/rack/mount/analysis/splitting.rb

### Parent

Rack::Mount::Analysis::Frequency

### Namespace

- CLASS Rack::Mount::Analysis::Splitting::Key

### Methods

- #<<
- #clear
- #lookup_separators
- #process_key
- #separators

### Files

- LICENSE
- README.rdoc

### 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
- Multimap
- Multiset
- NestedMultimap

No matching classes.

# Rack::Mount::Analysis::Splitting

### Constants

NULL

### Attributes

separators[W]

### Public Instance Methods

<<(key) click to toggle source

    # File lib/rack/mount/analysis/splitting.rb, line 34
    def <<(key)
      super
      key.each_pair do |k, v|
        analyze_capture_boundaries(v, @boundaries[k] ||= Histogram.new)
      end
    end

clear() click to toggle source

    # File lib/rack/mount/analysis/splitting.rb, line 29
    def clear
      @boundaries = {}
      super
    end

lookup_separators(key) click to toggle source

    # File lib/rack/mount/analysis/splitting.rb, line 47
    def lookup_separators(key)
      @boundaries[key].keys_in_upper_quartile
    end

process_key(requirements, method, requirement) click to toggle source

    # File lib/rack/mount/analysis/splitting.rb, line 51
    def process_key(requirements, method, requirement)
      separators = separators(method)
      if requirement.is_a?(Regexp) && separators.any?
        generate_split_keys(requirement, separators).each_with_index do |value, index|
          requirements[Key.new(method, index, Regexp.union(*separators))] = value
        end
      else
        super
      end
    end

separators(key) click to toggle source

    # File lib/rack/mount/analysis/splitting.rb, line 41
    def separators(key)
      @separators ||= {}
      @separators[key] ||= lookup_separators(key)
    end

[Validate]

Generated with the Darkfish Rdoc Generator 2.