class ActionDispatch::Routing::Mapper::Mapping

def initialize(set:, ast:, controller:, default_action:, to:, formatted:, via:, options_constraints:, anchor:, scope_params:, options:)

Experimental RBS support (using type sampling data from the type_fusion project).

def initialize: (set: ActionDispatch::Routing::RouteSet, ast: ActionDispatch::Journey::Ast, controller: String?, default_action: String?, to: String?, formatted: nil, via: Array[Symbol], options_constraints: Hash, anchor: true, scope_params: Hash, options: Hash) -> void

This signature was generated using 2 samples from 1 application.

def initialize(set:, ast:, controller:, default_action:, to:, formatted:, via:, options_constraints:, anchor:, scope_params:, options:)
  @defaults           = scope_params[:defaults]
  @set                = set
  @to                 = intern(to)
  @default_controller = intern(controller)
  @default_action     = intern(default_action)
  @anchor             = anchor
  @via                = via
  @internal           = options.delete(:internal)
  @scope_options      = scope_params[:options]
  ast                 = Journey::Ast.new(ast, formatted)
  options = ast.wildcard_options.merge!(options)
  options = normalize_options!(options, ast.path_params, scope_params[:module])
  split_options = constraints(options, ast.path_params)
  constraints = scope_params[:constraints].merge Hash[split_options[:constraints] || []]
  if options_constraints.is_a?(Hash)
    @defaults = Hash[options_constraints.find_all { |key, default|
      URL_OPTIONS.include?(key) && (String === default || Integer === default)
    }].merge @defaults
    @blocks = scope_params[:blocks]
    constraints.merge! options_constraints
  else
    @blocks = blocks(options_constraints)
  end
  requirements, conditions = split_constraints ast.path_params, constraints
  verify_regexp_requirements requirements, ast.wildcard_options
  formats = normalize_format(formatted)
  @requirements = formats[:requirements].merge Hash[requirements]
  @conditions = Hash[conditions]
  @defaults = formats[:defaults].merge(@defaults).merge(normalize_defaults(options))
  if ast.path_params.include?(:action) && !@requirements.key?(:action)
    @defaults[:action] ||= "index"
  end
  @required_defaults = (split_options[:required_defaults] || []).map(&:first)
  ast.requirements = @requirements
  @path = Journey::Path::Pattern.new(ast, @requirements, JOINED_SEPARATORS, @anchor)
end