Class: Extension::Models::SpecificationHandlers::WebPixelExtensionUtils::ScriptConfig
- Inherits:
-
Object
- Object
- Extension::Models::SpecificationHandlers::WebPixelExtensionUtils::ScriptConfig
- Defined in:
- lib/project_types/extension/models/specification_handlers/web_pixel_extension_utils/script_config.rb
Constant Summary collapse
- REQUIRED_FIELDS =
%w(version)
Instance Attribute Summary collapse
-
#configuration ⇒ Object
readonly
Returns the value of attribute configuration.
-
#content ⇒ Object
readonly
Returns the value of attribute content.
-
#filename ⇒ Object
readonly
Returns the value of attribute filename.
-
#version ⇒ Object
readonly
Returns the value of attribute version.
Instance Method Summary collapse
-
#initialize(content:, filename:) ⇒ ScriptConfig
constructor
A new instance of ScriptConfig.
Constructor Details
#initialize(content:, filename:) ⇒ ScriptConfig
Returns a new instance of ScriptConfig.
12 13 14 15 16 17 18 |
# File 'lib/project_types/extension/models/specification_handlers/web_pixel_extension_utils/script_config.rb', line 12 def initialize(content:, filename:) @filename = filename validate_content!(content) @content = content @version = @content["version"].to_s @configuration = @content["configuration"] end |
Instance Attribute Details
#configuration ⇒ Object (readonly)
Returns the value of attribute configuration.
8 9 10 |
# File 'lib/project_types/extension/models/specification_handlers/web_pixel_extension_utils/script_config.rb', line 8 def configuration @configuration end |
#content ⇒ Object (readonly)
Returns the value of attribute content.
8 9 10 |
# File 'lib/project_types/extension/models/specification_handlers/web_pixel_extension_utils/script_config.rb', line 8 def content @content end |
#filename ⇒ Object (readonly)
Returns the value of attribute filename.
8 9 10 |
# File 'lib/project_types/extension/models/specification_handlers/web_pixel_extension_utils/script_config.rb', line 8 def filename @filename end |
#version ⇒ Object (readonly)
Returns the value of attribute version.
8 9 10 |
# File 'lib/project_types/extension/models/specification_handlers/web_pixel_extension_utils/script_config.rb', line 8 def version @version end |