def add(*patterns)
      patterns.each do |pattern|
        pattern = Mustermann.new(pattern, **@options)
        if block_given?
          @api_expander.add(yield(pattern))
        else
          raise NotImplementedError, "expanding not supported for #{pattern.class}" unless pattern.respond_to? :to_ast
          @api_expander.add(pattern.to_ast)
        end
        @patterns << pattern
      end
      self
    end
def add(*patterns)
      patterns.each do |pattern|
        pattern = Mustermann.new(pattern, **@options)
        if block_given?
          @api_expander.add(yield(pattern))
        else
          raise NotImplementedError, "expanding not supported for #{pattern.class}" unless pattern.respond_to? :to_ast
          @api_expander.add(pattern.to_ast)
        end
        @patterns << pattern
      end
      self
    end
@param [Array<#to_str, Mustermann::Pattern>] patterns list of patterns to expand, see {#add}.
 @param [Symbol] additional_values behavior when encountering additional values, see {#expand}.
 @param [Hash] options used when creating/expanding patterns, see {Mustermann.new}.
 Add patterns to expand.

 @example
   expander = Mustermann::Expander.new
   expander.add("/:a.jpg", "/:b.png")
   expander.expand(a: "pony") # => "/pony.jpg"

 @param [Array<#to_str, Mustermann::Pattern>] patterns list of to add for expansion, Strings will be compiled to patterns.
 @return [Mustermann::Expander] the expander