Sha256: 191d70dd8f88498ec3cc283e11a0479deaeb8aaf0ce9e7c6fb4ced1c79230277

Contents?: true

Size: 861 Bytes

Versions: 3

Compression:

Stored size: 861 Bytes

Contents

module Formalist
  module RichText
    class EmbeddedFormsContainer
      class Registration
        DEFAULT_INPUT_PROCESSOR = -> input { input }.freeze

        attr_reader :label
        attr_reader :form
        attr_reader :schema
        attr_reader :input_processor
        attr_reader :preview_image_url

        def initialize(label:, form:, schema:, preview_image_url: nil, input_processor: DEFAULT_INPUT_PROCESSOR)
          @label = label
          @form = form
          @schema = schema
          @input_processor = input_processor
          @preview_image_url = preview_image_url
        end

        def to_h
          {
            label: label,
            form: form,
            schema: schema,
            input_processor: input_processor,
            preview_image_url: preview_image_url
          }
        end
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
formalist-0.9.0 lib/formalist/rich_text/embedded_forms_container/registration.rb
formalist-0.8.0 lib/formalist/rich_text/embedded_forms_container/registration.rb
formalist-0.7.0 lib/formalist/rich_text/embedded_forms_container/registration.rb