Class: Tuya::EXE

Inherits:
Object
  • Object
show all
Defined in:
lib/tycli/executable.rb

Class Method Summary collapse

Class Method Details

.exe(executable, command, raise_if_need = false) ⇒ Object



3
4
5
6
7
8
9
10
11
12
13
# File 'lib/tycli/executable.rb', line 3

def self.exe(executable, command, raise_if_need = false)
	require 'cocoapods'
	require 'cocoapods/executable'
	require 'tycli/util/puts_util'

	result = Pod::Executable.execute_command(executable, command, raise_if_need)

	TYUtil::TYPuts.filter(result, TYUtil::TYPuts::ERROR_KEYS)
	
	result
end

.multi_exe(executable, commands, raise_if_need = false) ⇒ Object



15
16
17
18
19
# File 'lib/tycli/executable.rb', line 15

def self.multi_exe(executable, commands, raise_if_need = false)
	commands.each do |command|
		exe(executable, command, raise_if_need)
	end
end