Class: CKEditor5::Rails::Context::PresetBuilder
- Inherits:
-
Object
- Object
- CKEditor5::Rails::Context::PresetBuilder
- Defined in:
- lib/ckeditor5/rails/context/preset_builder.rb
Instance Method Summary collapse
-
#initialize(&block) ⇒ PresetBuilder
constructor
A new instance of PresetBuilder.
- #initialize_copy(source) ⇒ Object
Methods included from Presets::Concerns::PluginMethods
#external_plugin, #inline_plugin, #plugin, #plugins
Methods included from Presets::Concerns::ConfigurationMethods
Constructor Details
#initialize(&block) ⇒ PresetBuilder
Returns a new instance of PresetBuilder.
12 13 14 15 16 17 18 |
# File 'lib/ckeditor5/rails/context/preset_builder.rb', line 12 def initialize(&block) @config = { plugins: [] } instance_eval(&block) if block_given? end |
Instance Method Details
#initialize_copy(source) ⇒ Object
20 21 22 23 24 25 26 27 28 |
# File 'lib/ckeditor5/rails/context/preset_builder.rb', line 20 def initialize_copy(source) super @config = { plugins: source.config[:plugins].map(&:dup) }.merge( source.config.except(:plugins).deep_dup ) end |