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.

[View source]

366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
# File 'actionpack/lib/action_dispatch/routing/route_set.rb', line 366

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