class CKEditor5::Rails::Assets::AssetsBundle

def <<(other)

def <<(other)
  raise TypeError, 'other must be an instance of AssetsBundle' unless other.is_a?(AssetsBundle)
  @scripts = scripts + other.scripts
  @stylesheets = stylesheets + other.stylesheets
end

def empty?

def empty?
  scripts.empty? && stylesheets.empty?
end

def initialize

def initialize
  validate_implementation!
end

def preloads

def preloads
  stylesheets + scripts.map(&:url)
end

def translations_scripts

def translations_scripts
  scripts.select(&:translation?)
end

def validate_implementation!

def validate_implementation!
  %i[scripts stylesheets].each do |method|
    unless respond_to?(method, true)
      raise NotImplementedError, "#{self.class} must implement the ##{method} method"
    end
  end
end