Class: Extension::Commands::ExtensionCommand

Inherits:
ShopifyCli::Command show all
Defined in:
lib/project_types/extension/commands/extension_command.rb

Direct Known Subclasses

Build, Push, Register, Serve, Tunnel

Instance Attribute Summary

Attributes inherited from ShopifyCli::Command

#ctx, #options

Instance Method Summary collapse

Methods inherited from ShopifyCli::Command

call, call_help, #initialize, options, prerequisite_task, run_prerequisites, subcommand, subcommand_registry

Methods included from ShopifyCli::Feature::Set

#hidden?, #hidden_feature

Constructor Details

This class inherits a constructor from ShopifyCli::Command

Instance Method Details

#extension_typeObject



11
12
13
14
15
16
17
18
19
# File 'lib/project_types/extension/commands/extension_command.rb', line 11

def extension_type
  @extension_type ||= begin
    unless Models::Type.valid?(project.extension_type_identifier)
      @ctx.abort(@ctx.message('errors.unknown_type', project.extension_type_identifier))
    end

    Models::Type.load_type(project.extension_type_identifier)
  end
end

#projectObject



7
8
9
# File 'lib/project_types/extension/commands/extension_command.rb', line 7

def project
  @project ||= ExtensionProject.current
end