lib/mustermann/mapper.rb in mustermann-1.0.3 vs lib/mustermann/mapper.rb in mustermann-1.1.0
- old
+ new
@@ -38,14 +38,10 @@
# @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")
+ # Mustermann::Mapper.new({"/:foo" => "/:foo.html"}, type: :rails)
def initialize(map = {}, additional_values: :ignore, **options, &block)
@map = []
@options = options
@additional_values = additional_values
block.arity == 0 ? update(yield) : yield(self) if block