Method: ActionDispatch::Routing::RouteSet#initialize

Defined in:
actionpack/lib/action_dispatch/routing/route_set.rb

#initialize(config = DEFAULT_CONFIG) ⇒ RouteSet

Returns a new instance of RouteSet.



384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
# File 'actionpack/lib/action_dispatch/routing/route_set.rb', line 384

def initialize(config = DEFAULT_CONFIG)
  self.named_routes = NamedRouteCollection.new
  self.resources_path_names = self.class.default_resources_path_names
  self.default_url_options = {}
  self.draw_paths = []

  @config                     = config
  @append                     = []
  @prepend                    = []
  @disable_clear_and_finalize = false
  @finalized                  = false
  @env_key                    = "ROUTES_#{object_id}_SCRIPT_NAME"
  @default_env                = nil

  @set    = Journey::Routes.new
  @router = Journey::Router.new @set
  @formatter = Journey::Formatter.new self
  @polymorphic_mappings = {}
end