module Formalist
  module RichText
    module Rendering
      class EmbeddedFormRenderer
        attr_reader :container
        attr_reader :render_options

        def initialize(container: {}, render_options: {})
          @container = container
          @render_options = render_options
        end

        def call(form_data)
          type, data = form_data.values_at(:name, :data)

          if container.key?(type)
            container[type].(data, render_options)
          else
            ""
          end
        end
      end
    end
  end
end

module Formalist
  module RichText
    module Rendering
      class EmbeddedFormRenderer
        attr_reader :container
        attr_reader :options

        def initialize(container = {}, **options)
          @container = container
          @options = options
        end

        def call(form_data)
          type, data = form_data.values_at(:name, :data)

          if container.key?(type)
            container[type].(data, options)
          else
            ""
          end
        end
      end
    end
  end
end

Tweak EmbeddedFormRenderer API a little
Tweak EmbeddedFormRenderer API a little

Make the container a single, positional parameter, followed by a splat of options.
