class CKEditor5::Rails::Assets::JSImportMeta
def esm?
def esm? import_name.present? end
def initialize(import_as: nil, import_name: nil, window_name: nil)
def initialize(import_as: nil, import_name: nil, window_name: nil) validate_arguments!(import_as, import_name, window_name) @import_as = import_as @import_name = import_name @window_name = window_name end
def to_h
def to_h { import_as: import_as, import_name: import_name, window_name: window_name }.compact end
def validate_arguments!(import_as, import_name, window_name)
def validate_arguments!(import_as, import_name, window_name) if import_name.nil? && window_name.nil? raise ArgumentError, 'import_name or window_name must be present' end raise ArgumentError, 'import_name required when import_as is present' if import_as && import_name.nil? end
def window?
def window? window_name.present? end