Class: CKEditor5::Rails::Assets::JSImportMeta
- Inherits:
-
Object
- Object
- CKEditor5::Rails::Assets::JSImportMeta
- Defined in:
- lib/ckeditor5/rails/assets/assets_bundle.rb
Instance Attribute Summary collapse
-
#import_as ⇒ Object
readonly
Returns the value of attribute import_as.
-
#import_name ⇒ Object
readonly
Returns the value of attribute import_name.
-
#window_name ⇒ Object
readonly
Returns the value of attribute window_name.
Instance Method Summary collapse
- #esm? ⇒ Boolean
-
#initialize(import_as: nil, import_name: nil, window_name: nil) ⇒ JSImportMeta
constructor
A new instance of JSImportMeta.
- #to_h ⇒ Object
- #window? ⇒ Boolean
Constructor Details
#initialize(import_as: nil, import_name: nil, window_name: nil) ⇒ JSImportMeta
Returns a new instance of JSImportMeta.
100 101 102 103 104 105 |
# File 'lib/ckeditor5/rails/assets/assets_bundle.rb', line 100 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 |
Instance Attribute Details
#import_as ⇒ Object (readonly)
Returns the value of attribute import_as.
98 99 100 |
# File 'lib/ckeditor5/rails/assets/assets_bundle.rb', line 98 def import_as @import_as end |
#import_name ⇒ Object (readonly)
Returns the value of attribute import_name.
98 99 100 |
# File 'lib/ckeditor5/rails/assets/assets_bundle.rb', line 98 def import_name @import_name end |
#window_name ⇒ Object (readonly)
Returns the value of attribute window_name.
98 99 100 |
# File 'lib/ckeditor5/rails/assets/assets_bundle.rb', line 98 def window_name @window_name end |
Instance Method Details
#esm? ⇒ Boolean
111 112 113 |
# File 'lib/ckeditor5/rails/assets/assets_bundle.rb', line 111 def esm? import_name.present? end |
#to_h ⇒ Object
115 116 117 118 119 120 121 |
# File 'lib/ckeditor5/rails/assets/assets_bundle.rb', line 115 def to_h { import_as: import_as, import_name: import_name, window_name: window_name }.compact end |
#window? ⇒ Boolean
107 108 109 |
# File 'lib/ckeditor5/rails/assets/assets_bundle.rb', line 107 def window? window_name.present? end |