Class: PHP::Forms::Create

Inherits:
ShopifyCLI::Form show all
Defined in:
lib/project_types/php/forms/create.rb

Instance Attribute Summary

Attributes inherited from ShopifyCLI::Form

#ctx, #xargs

Instance Method Summary collapse

Methods inherited from ShopifyCLI::Form

ask, flag_arguments, #initialize, positional_arguments

Constructor Details

This class inherits a constructor from ShopifyCLI::Form

Instance Method Details

#askObject



8
9
10
11
12
13
14
15
# File 'lib/project_types/php/forms/create.rb', line 8

def ask
  self.name ||= CLI::UI::Prompt.ask(ctx.message("php.forms.create.app_name"))
  self.name = format_name
  self.type = ask_type
  res = ShopifyCLI::Tasks::SelectOrgAndShop.call(ctx, organization_id: organization_id, shop_domain: shop_domain)
  self.organization_id = res[:organization_id]
  self.shop_domain = res[:shop_domain]
end