Class: IOS::TuistCommands
- Inherits:
-
Object
- Object
- IOS::TuistCommands
- Defined in:
- lib/ios/module/setup/TuistCommands.rb
Instance Method Summary collapse
- #build ⇒ Object
- #generateExample(open_workspace = true) ⇒ Object
-
#initialize ⇒ TuistCommands
constructor
A new instance of TuistCommands.
Constructor Details
#initialize ⇒ TuistCommands
Returns a new instance of TuistCommands.
3 4 |
# File 'lib/ios/module/setup/TuistCommands.rb', line 3 def initialize() end |
Instance Method Details
#build ⇒ Object
27 28 29 30 |
# File 'lib/ios/module/setup/TuistCommands.rb', line 27 def build puts "Rodando " + "tuist build".magenta system('tuist build') end |
#generateExample(open_workspace = true) ⇒ Object
6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 |
# File 'lib/ios/module/setup/TuistCommands.rb', line 6 def generateExample(open_workspace = true) current_directory = File.basename(Dir.pwd) if current_directory == "Example" puts "Rodando " + "tuist generate".magenta + " no projeto Exemplo" system('tuist generate --no-open') if File.exist?("Podfile") puts "Rodando " + "pod install".magenta + " no projeto Exemplo" system("pod install") else puts "\n❌ Arquivo Podfile não encontrado!".red end if File.exist?("Example.xcworkspace") system('open Example.xcworkspace') if open_workspace else puts "\n❌ Arquivo Example.xcworkspace não encontrado!".red end else puts "Navegue até o diretório do Example!".red end end |