Sha256: 2a000e50786c5ec66f11f4e4ec3cb66305c42c507175a86024b321f304494a83

Contents?: true

Size: 681 Bytes

Versions: 15

Compression:

Stored size: 681 Bytes

Contents

# frozen_string_literal: true

require_relative '../presets/concerns/configuration_methods'
require_relative '../presets/concerns/plugin_methods'

module CKEditor5::Rails
  module Context
    class PresetBuilder
      include Presets::Concerns::ConfigurationMethods
      include Presets::Concerns::PluginMethods

      def initialize(&block)
        @config = {
          plugins: []
        }

        instance_eval(&block) if block_given?
      end

      def initialize_copy(source)
        super

        @config = {
          plugins: source.config[:plugins].map(&:dup)
        }.merge(
          source.config.except(:plugins).deep_dup
        )
      end
    end
  end
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
ckeditor5-1.19.5 lib/ckeditor5/rails/context/preset_builder.rb
ckeditor5-1.19.4 lib/ckeditor5/rails/context/preset_builder.rb
ckeditor5-1.19.3 lib/ckeditor5/rails/context/preset_builder.rb
ckeditor5-1.19.2 lib/ckeditor5/rails/context/preset_builder.rb
ckeditor5-1.19.1 lib/ckeditor5/rails/context/preset_builder.rb
ckeditor5-1.19.0 lib/ckeditor5/rails/context/preset_builder.rb
ckeditor5-1.18.3 lib/ckeditor5/rails/context/preset_builder.rb
ckeditor5-1.18.1 lib/ckeditor5/rails/context/preset_builder.rb
ckeditor5-1.18.0 lib/ckeditor5/rails/context/preset_builder.rb
ckeditor5-1.17.4 lib/ckeditor5/rails/context/preset_builder.rb
ckeditor5-1.17.3 lib/ckeditor5/rails/context/preset_builder.rb
ckeditor5-1.17.2 lib/ckeditor5/rails/context/preset_builder.rb
ckeditor5-1.17.1 lib/ckeditor5/rails/context/preset_builder.rb
ckeditor5-1.17.0 lib/ckeditor5/rails/context/preset_builder.rb
ckeditor5-1.16.2 lib/ckeditor5/rails/context/preset_builder.rb