Class: ActionDispatch::Routing::Mapper::Mapping

Inherits:
Object
  • Object
show all
Defined in:
lib/action_dispatch/routing/mapper.rb

Overview

:nodoc:

Constant Summary collapse

IGNORE_OPTIONS =
[:to, :as, :via, :on, :constraints, :defaults, :only, :except, :anchor, :shallow, :shallow_path, :shallow_prefix]

Instance Method Summary collapse

Constructor Details

#initialize(set, scope, path, options) ⇒ Mapping

Returns a new instance of Mapping.



51
52
53
54
55
56
# File 'lib/action_dispatch/routing/mapper.rb', line 51

def initialize(set, scope, path, options)
  @set, @scope = set, scope
  @options = (@scope[:options] || {}).merge(options)
  @path = normalize_path(path)
  normalize_options!
end

Instance Method Details

#to_routeObject



58
59
60
# File 'lib/action_dispatch/routing/mapper.rb', line 58

def to_route
  [ app, conditions, requirements, defaults, @options[:as], @options[:anchor] ]
end