Class: IOS::ConfigureSwift
- Inherits:
-
Object
- Object
- IOS::ConfigureSwift
- Defined in:
- lib/ios/module/setup/ConfigureSwift.rb
Instance Attribute Summary collapse
-
#configurator ⇒ Object
readonly
Returns the value of attribute configurator.
-
#root_path ⇒ Object
readonly
Returns the value of attribute root_path.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(options) ⇒ ConfigureSwift
constructor
A new instance of ConfigureSwift.
- #perform ⇒ Object
Constructor Details
#initialize(options) ⇒ ConfigureSwift
Returns a new instance of ConfigureSwift.
11 12 13 |
# File 'lib/ios/module/setup/ConfigureSwift.rb', line 11 def initialize() @configurator = .fetch(:configurator) end |
Instance Attribute Details
#configurator ⇒ Object (readonly)
Returns the value of attribute configurator.
5 6 7 |
# File 'lib/ios/module/setup/ConfigureSwift.rb', line 5 def configurator @configurator end |
#root_path ⇒ Object (readonly)
Returns the value of attribute root_path.
5 6 7 |
# File 'lib/ios/module/setup/ConfigureSwift.rb', line 5 def root_path @root_path end |
Class Method Details
.perform(options) ⇒ Object
7 8 9 |
# File 'lib/ios/module/setup/ConfigureSwift.rb', line 7 def self.perform() new().perform end |
Instance Method Details
#perform ⇒ Object
15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 |
# File 'lib/ios/module/setup/ConfigureSwift.rb', line 15 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 |