Class: ShopifyCLI::Theme::Syncer::Uploader::Forms::BaseStrategyForm
- Defined in:
- lib/shopify_cli/theme/syncer/uploader/forms/base_strategy_form.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#strategy ⇒ Object
Returns the value of attribute strategy.
Attributes inherited from Form
Instance Method Summary collapse
Methods inherited from Form
ask, flag_arguments, #initialize, positional_arguments
Constructor Details
This class inherits a constructor from ShopifyCLI::Form
Instance Attribute Details
#strategy ⇒ Object
Returns the value of attribute strategy.
9 10 11 |
# File 'lib/shopify_cli/theme/syncer/uploader/forms/base_strategy_form.rb', line 9 def strategy @strategy end |
Instance Method Details
#ask ⇒ Object
11 12 13 14 15 16 17 18 19 20 21 22 23 |
# File 'lib/shopify_cli/theme/syncer/uploader/forms/base_strategy_form.rb', line 11 def ask ctx.puts(title_context(file)) self.strategy = CLI::UI::Prompt.ask(title_question, allow_empty: false) do |handler| strategies.each do |strategy| handler.option(as_text(strategy)) { strategy } end end exit_cli if self.strategy == :exit self end |