Sha256: 065207b2d066a51858fc2dcb5a62c289669499efccdac9ab9c09f54cc31b2ed4
Contents?: true
Size: 558 Bytes
Versions: 15
Compression:
Stored size: 558 Bytes
Contents
# frozen_string_literal: true module CKEditor5::Rails module Context class Props def initialize(config) @config = config end def to_attributes { plugins: serialize_plugins, config: serialize_config } end private attr_reader :config def serialize_plugins (config[:plugins] || []).map { |plugin| Editor::PropsPlugin.normalize(plugin).to_h }.to_json end def serialize_config config.except(:plugins).to_json end end end end
Version data entries
15 entries across 15 versions & 1 rubygems