class Pod::Command::IPC::Repl

Constants

END_OF_OUTPUT_SIGNAL

Public Instance Methods

execute_repl_command(repl_command) click to toggle source
# File lib/cocoapods/command/ipc/repl.rb, line 38
def execute_repl_command(repl_command)
  unless repl_command == '\n'
    repl_commands = repl_command.split
    subcommand = repl_commands.shift.capitalize
    arguments = repl_commands
    subcommand_class = Pod::Command::IPC.const_get(subcommand)
    subcommand_class.new(CLAide::ARGV.new(arguments)).run
    signal_end_of_output
  end
end
listen() click to toggle source
# File lib/cocoapods/command/ipc/repl.rb, line 32
def listen
  while repl_command = STDIN.gets
    execute_repl_command(repl_command)
  end
end
print_version() click to toggle source
run() click to toggle source
# File lib/cocoapods/command/ipc/repl.rb, line 17
def run
  print_version
  signal_end_of_output
  listen
end
signal_end_of_output() click to toggle source
# File lib/cocoapods/command/ipc/repl.rb, line 27
def signal_end_of_output
  output_pipe.puts(END_OF_OUTPUT_SIGNAL)
  STDOUT.flush
end