Class: ShopifyCLI::Theme::Syncer::Uploader::Forms::ApplyToAll
- Inherits:
-
Object
- Object
- ShopifyCLI::Theme::Syncer::Uploader::Forms::ApplyToAll
- Defined in:
- lib/shopify_cli/theme/syncer/uploader/forms/apply_to_all.rb
Instance Attribute Summary collapse
-
#value ⇒ Object
readonly
Returns the value of attribute value.
Instance Method Summary collapse
- #apply?(value) ⇒ Boolean
-
#initialize(ctx, number_of_files) ⇒ ApplyToAll
constructor
A new instance of ApplyToAll.
Constructor Details
#initialize(ctx, number_of_files) ⇒ ApplyToAll
Returns a new instance of ApplyToAll.
13 14 15 16 17 18 |
# File 'lib/shopify_cli/theme/syncer/uploader/forms/apply_to_all.rb', line 13 def initialize(ctx, number_of_files) @ctx = ctx @number_of_files = number_of_files @value = nil @apply = nil end |
Instance Attribute Details
#value ⇒ Object (readonly)
Returns the value of attribute value.
11 12 13 |
# File 'lib/shopify_cli/theme/syncer/uploader/forms/apply_to_all.rb', line 11 def value @value end |
Instance Method Details
#apply?(value) ⇒ Boolean
20 21 22 23 24 25 26 27 28 29 |
# File 'lib/shopify_cli/theme/syncer/uploader/forms/apply_to_all.rb', line 20 def apply?(value) return unless @number_of_files > 1 if @apply.nil? @apply = ask.apply? @value = value if @apply end @apply end |