Sha256: fd2c49f2798ede34f16111d904236fb3c7b392218afc110017fa3feb0ac1b2b3
Contents?: true
Size: 583 Bytes
Versions: 6
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
6 entries across 6 versions & 1 rubygems