Sha256: d2eca6980bba76e994b7f1e894f2206e19920290ffa5c16bb4fa9ed7a1fe5280

Contents?: true

Size: 1.22 KB

Versions: 4

Compression:

Stored size: 1.22 KB

Contents

require 'ios/module/setup/ProjectManipulator'

module IOS
  class ConfigureSwift
    attr_reader :configurator, :root_path

    def self.perform(options)
      new(options).perform
    end

    def initialize(options)
      @configurator = options.fetch(:configurator)
    end

    def perform
      hasInterface = configurator.ask_with_answers("Criar módulo de interfaces", ["Yes", "No"]).to_sym
      hasTest = configurator.ask_with_answers("Criar pasta de teste", ["Yes", "No"]).to_sym
      moduleType = configurator.ask_with_answers("Qual o tipo do módulo", ["Core", "Feature"]).to_sym
      keepDemo = configurator.ask_with_answers("Criar projeto exemplo", ["No", "Yes"]).to_sym
      hasSwiftgen = configurator.ask_with_answers("Criar Swiftgen", ["Yes", "No"]).to_sym

      ProjectManipulator.new({
                                    :configurator => @configurator,
                                    :keep_demo => keepDemo,
                                    :module_type => moduleType,
                                    :has_swiftgen => hasSwiftgen,
                                    :has_interface => hasInterface,
                                    :has_test => hasTest
                                  }).run
    end

  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
shellboxCLI-0.1.3 lib/ios/module/setup/ConfigureSwift.rb
shellboxCLI-0.1.2 lib/ios/module/setup/ConfigureSwift.rb
shellboxCLI-0.1.1 lib/ios/module/setup/ConfigureSwift.rb
shellboxCLI-0.1.0 lib/ios/module/setup/ConfigureSwift.rb