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.
60 61 62 63 64 65 |
# File 'lib/ckeditor5/rails/assets/assets_bundle.rb', line 60 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.
58 59 60 |
# File 'lib/ckeditor5/rails/assets/assets_bundle.rb', line 58 def import_as @import_as end |
#import_name ⇒ Object (readonly)
Returns the value of attribute import_name.
58 59 60 |
# File 'lib/ckeditor5/rails/assets/assets_bundle.rb', line 58 def import_name @import_name end |
#window_name ⇒ Object (readonly)
Returns the value of attribute window_name.
58 59 60 |
# File 'lib/ckeditor5/rails/assets/assets_bundle.rb', line 58 def window_name @window_name end |
Instance Method Details
#esm? ⇒ Boolean
67 68 69 |
# File 'lib/ckeditor5/rails/assets/assets_bundle.rb', line 67 def esm? import_name.present? end |
#to_h ⇒ Object
75 76 77 78 79 80 81 |
# File 'lib/ckeditor5/rails/assets/assets_bundle.rb', line 75 def to_h { import_as: import_as, import_name: import_name, window_name: window_name }.compact end |
#window? ⇒ Boolean
71 72 73 |
# File 'lib/ckeditor5/rails/assets/assets_bundle.rb', line 71 def window? window_name.present? end |