Class: CKEditor5::Rails::Assets::AssetsBundle
- Inherits:
-
Object
- Object
- CKEditor5::Rails::Assets::AssetsBundle
show all
- Defined in:
- lib/ckeditor5/rails/assets/assets_bundle.rb
Instance Method Summary
collapse
Constructor Details
Returns a new instance of AssetsBundle.
7
8
9
|
# File 'lib/ckeditor5/rails/assets/assets_bundle.rb', line 7
def initialize
validate_implementation!
end
|
Instance Method Details
#<<(other) ⇒ Object
23
24
25
26
27
28
|
# File 'lib/ckeditor5/rails/assets/assets_bundle.rb', line 23
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
|
#empty? ⇒ Boolean
11
12
13
|
# File 'lib/ckeditor5/rails/assets/assets_bundle.rb', line 11
def empty?
scripts.empty? && stylesheets.empty?
end
|
#preloads ⇒ Object
19
20
21
|
# File 'lib/ckeditor5/rails/assets/assets_bundle.rb', line 19
def preloads
stylesheets + scripts.map(&:url)
end
|
#translations_scripts ⇒ Object
15
16
17
|
# File 'lib/ckeditor5/rails/assets/assets_bundle.rb', line 15
def translations_scripts
scripts.select(&:translation?)
end
|