Mustermann::Mapper#initialize

Parsed documentation:
View on GitHub
Creates a new mapper.

@overload initialize(**options)
  @param options [Hash] options The options hash
  @yield block for generating mappings as a hash
  @yieldreturn [Hash] see {#update}

  @example
    require 'mustermann/mapper'
    Mustermann::Mapper.new(type: :rails) {{
      "/:foo" => ["/:foo.html", "/:foo.:format"]
    }}

@overload initialize(**options)
  @param  options [Hash] options The options hash
  @yield block for generating mappings as a hash
  @yieldparam mapper [Mustermann::Mapper] the mapper instance

  @example
    require 'mustermann/mapper'
    Mustermann::Mapper.new(type: :rails) do |mapper|
      mapper["/:foo"] = ["/:foo.html", "/:foo.:format"]
    end

@overload initialize(map = {}, **options)
  @param map [Hash] see {#update}
  @param [Hash] options The options hash

  @example map before options
    require 'mustermann/mapper'
    Mustermann::Mapper.new("/:foo" => "/:foo.html", type: :rails)

  @example map after options
    require 'mustermann/mapper'
    Mustermann::Mapper.new(type: :rails, "/:foo" => "/:foo.html")
Suggestions:
Please help! Open an issue on GitHub if this assessment is incorrect.