Class: CKEditor5::Rails::Editor::PropsBasePlugin
- Inherits:
-
Object
- Object
- CKEditor5::Rails::Editor::PropsBasePlugin
- Defined in:
- lib/ckeditor5/rails/editor/props_base_plugin.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#assets_bundle ⇒ Object
readonly
Returns the value of attribute assets_bundle.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(name) ⇒ PropsBasePlugin
constructor
A new instance of PropsBasePlugin.
- #preload_assets_bundle ⇒ Object
- #to_h ⇒ Object
Constructor Details
#initialize(name) ⇒ PropsBasePlugin
Returns a new instance of PropsBasePlugin.
7 8 9 |
# File 'lib/ckeditor5/rails/editor/props_base_plugin.rb', line 7 def initialize(name) @name = name end |
Instance Attribute Details
#assets_bundle ⇒ Object (readonly)
Returns the value of attribute assets_bundle.
5 6 7 |
# File 'lib/ckeditor5/rails/editor/props_base_plugin.rb', line 5 def assets_bundle @assets_bundle end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
5 6 7 |
# File 'lib/ckeditor5/rails/editor/props_base_plugin.rb', line 5 def name @name end |
Class Method Details
.normalize(plugin, **kwargs) ⇒ Object
19 20 21 22 23 24 25 |
# File 'lib/ckeditor5/rails/editor/props_base_plugin.rb', line 19 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 |
Instance Method Details
#preload_assets_bundle ⇒ Object
11 12 13 |
# File 'lib/ckeditor5/rails/editor/props_base_plugin.rb', line 11 def preload_assets_bundle nil end |
#to_h ⇒ Object
15 16 17 |
# File 'lib/ckeditor5/rails/editor/props_base_plugin.rb', line 15 def to_h raise NotImplementedError, 'Method #to_h must be implemented in a subclass' end |