Class: Extension::Command::ExtensionCommand
- Inherits:
-
ShopifyCLI::Command::SubCommand
- Object
- CLI::Kit::BaseCommand
- ShopifyCLI::Command
- ShopifyCLI::Command::SubCommand
- Extension::Command::ExtensionCommand
- Defined in:
- lib/project_types/extension/commands/extension_command.rb
Instance Attribute Summary
Attributes inherited from ShopifyCLI::Command
Instance Method Summary collapse
Methods inherited from ShopifyCLI::Command::SubCommand
Methods inherited from ShopifyCLI::Command
call, call_help, check_node_version, check_ruby_version, check_version, #initialize, options, prerequisite_task, recommend_default_node_range, recommend_default_ruby_range, recommend_node, recommend_ruby, run_prerequisites, subcommand, subcommand_registry
Methods included from ShopifyCLI::Feature::Set
Constructor Details
This class inherits a constructor from ShopifyCLI::Command
Instance Method Details
#project ⇒ Object
7 8 9 |
# File 'lib/project_types/extension/commands/extension_command.rb', line 7 def project @project ||= ExtensionProject.current end |
#specification_handler ⇒ Object
11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 |
# File 'lib/project_types/extension/commands/extension_command.rb', line 11 def specification_handler @specification_handler ||= begin identifier = project.specification_identifier Models::LazySpecificationHandler.new(identifier) do specifications = Models::Specifications.new( fetch_specifications: Tasks::FetchSpecifications.new(api_key: project.app.api_key, context: @ctx) ) unless specifications.valid?(identifier) @ctx.abort(@ctx.("errors.unknown_type", project.specification_identifier)) end specifications[identifier] end end end |