Sha256: bb3de0476419751d57876f4a151b676751bcdc34029bb92756217b2d2c36df02
Contents?: true
Size: 1.37 KB
Versions: 2
Compression:
Stored size: 1.37 KB
Contents
# frozen_string_literal: true module Extension module Models module SpecificationHandlers class Default attr_reader :specification def initialize(specification) @specification = specification end def identifier specification.identifier.to_s.upcase end def graphql_identifier specification.graphql_identifier.to_s.upcase end def name message("name") end def tagline message("tagline") || "" end def config(context) argo.config(context) end def create(directory_name, context) argo.create(directory_name, identifier, context) end def extension_context(_context) nil end def valid_extension_contexts [] end protected def argo Features::Argo.new( git_template: specification.features.argo.git_template, renderer_package_name: specification.features.argo.renderer_package_name, ) end private def message(key, *params) return unless messages.key?(key.to_sym) messages[key.to_sym] % params end def messages @messages ||= Messages::TYPES[identifier.downcase.to_sym] || {} end end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
shopify-cli-1.7.1 | lib/project_types/extension/models/specification_handlers/default.rb |
shopify-cli-1.7.0 | lib/project_types/extension/models/specification_handlers/default.rb |