Commit 278b7345 authored by Fabio Pelosin's avatar Fabio Pelosin

[Command::IPC::Repl] Use eval to resolve subcommands

parent 478ef3a6
...@@ -120,6 +120,7 @@ module Pod ...@@ -120,6 +120,7 @@ module Pod
end end
def listen def listen
p Command::IPC::Podfile
signal_ready signal_ready
while repl_command = STDIN.gets while repl_command = STDIN.gets
execute_repl_command(repl_command) execute_repl_command(repl_command)
...@@ -135,7 +136,7 @@ module Pod ...@@ -135,7 +136,7 @@ module Pod
repl_commands = repl_command.split repl_commands = repl_command.split
subcommand = repl_commands.shift.capitalize subcommand = repl_commands.shift.capitalize
arguments = repl_commands arguments = repl_commands
subcommand_class = Kernel.const_get("Pod::Command::IPC::#{subcommand}") subcommand_class = eval("Pod::Command::IPC::#{subcommand}")
subcommand_class.new(CLAide::ARGV.new(arguments)).run subcommand_class.new(CLAide::ARGV.new(arguments)).run
signal_ready signal_ready
STDOUT.flush STDOUT.flush
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment