Sha256: fd2c49f2798ede34f16111d904236fb3c7b392218afc110017fa3feb0ac1b2b3

Contents?: true

Size: 583 Bytes

Versions: 26

Compression:

Stored size: 583 Bytes

Contents

# frozen_string_literal: true

module CKEditor5::Rails::Editor
  class PropsBasePlugin
    attr_reader :name, :assets_bundle

    def initialize(name)
      @name = name
    end

    def preload_assets_bundle
      nil
    end

    def to_h
      raise NotImplementedError, 'Method #to_h must be implemented in a subclass'
    end

    def self.normalize(plugin, **kwargs)
      case plugin
      when String, Symbol then PropsPlugin.new(plugin, **kwargs)
      when PropsBasePlugin then plugin
      else raise ArgumentError, "Invalid plugin: #{plugin}"
      end
    end
  end
end

Version data entries

26 entries across 26 versions & 2 rubygems

Version Path
trusty-cms-7.0.9.1 vendor/bundle/ruby/3.3.0/gems/ckeditor5-1.24.9/lib/ckeditor5/rails/editor/props_base_plugin.rb
ckeditor5-1.24.9 lib/ckeditor5/rails/editor/props_base_plugin.rb
ckeditor5-1.24.8 lib/ckeditor5/rails/editor/props_base_plugin.rb
ckeditor5-1.24.6 lib/ckeditor5/rails/editor/props_base_plugin.rb
ckeditor5-1.24.5 lib/ckeditor5/rails/editor/props_base_plugin.rb
ckeditor5-1.24.4 lib/ckeditor5/rails/editor/props_base_plugin.rb
ckeditor5-1.24.3 lib/ckeditor5/rails/editor/props_base_plugin.rb
ckeditor5-1.24.2 lib/ckeditor5/rails/editor/props_base_plugin.rb
ckeditor5-1.24.1 lib/ckeditor5/rails/editor/props_base_plugin.rb
ckeditor5-1.24.0 lib/ckeditor5/rails/editor/props_base_plugin.rb
ckeditor5-1.23.5 lib/ckeditor5/rails/editor/props_base_plugin.rb
ckeditor5-1.23.4 lib/ckeditor5/rails/editor/props_base_plugin.rb
ckeditor5-1.23.3 lib/ckeditor5/rails/editor/props_base_plugin.rb
ckeditor5-1.23.2 lib/ckeditor5/rails/editor/props_base_plugin.rb
ckeditor5-1.23.1 lib/ckeditor5/rails/editor/props_base_plugin.rb
ckeditor5-1.23.0 lib/ckeditor5/rails/editor/props_base_plugin.rb
ckeditor5-1.22.0 lib/ckeditor5/rails/editor/props_base_plugin.rb
ckeditor5-1.21.0 lib/ckeditor5/rails/editor/props_base_plugin.rb
ckeditor5-1.20.1 lib/ckeditor5/rails/editor/props_base_plugin.rb
ckeditor5-1.20.0 lib/ckeditor5/rails/editor/props_base_plugin.rb