Class: Extension::Models::SpecificationHandlers::WebPixelExtensionUtils::ScriptConfig

Inherits:
Object
  • Object
show all
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

Instance Method Summary collapse

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

#configurationObject (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

#contentObject (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

#filenameObject (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

#versionObject (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