Class: Extension::Models::SpecificationHandlers::WebPixelExtensionUtils::ScriptConfigRepository
- Inherits:
-
Object
- Object
- Extension::Models::SpecificationHandlers::WebPixelExtensionUtils::ScriptConfigRepository
show all
- Includes:
- SmartProperties
- Defined in:
- lib/project_types/extension/models/specification_handlers/web_pixel_extension_utils/script_config_repository.rb
Instance Method Summary
collapse
Instance Method Details
#active? ⇒ Boolean
10
11
12
|
# File 'lib/project_types/extension/models/specification_handlers/web_pixel_extension_utils/script_config_repository.rb', line 10
def active?
ctx.file_exist?(filename)
end
|
#filename ⇒ Object
23
24
25
|
# File 'lib/project_types/extension/models/specification_handlers/web_pixel_extension_utils/script_config_repository.rb', line 23
def filename
raise NotImplementedError
end
|
#get! ⇒ Object
14
15
16
17
18
19
20
21
|
# File 'lib/project_types/extension/models/specification_handlers/web_pixel_extension_utils/script_config_repository.rb', line 14
def get!
raise RuntimeError.new("NoScriptConfigFile"), filename unless active?
content = ctx.read(filename)
hash = file_content_to_hash(content)
from_h(hash)
end
|