Class: Pod::Command::IPC::Repl
Overview
———————————————————————–#
Constant Summary
collapse
- END_OF_OUTPUT_SIGNAL =
"\n\r"
Instance Method Summary
collapse
#output_pipe
#initialize, options, parse, report_error, run, verify_git_version!
#config
Constructor Details
This class inherits a constructor from Pod::Command
Instance Method Details
#execute_repl_command(repl_command) ⇒ Object
156
157
158
159
160
161
162
163
164
165
|
# File 'lib/cocoapods/command/inter_process_communication.rb', line 156
def execute_repl_command(repl_command)
if (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 ⇒ Object
150
151
152
153
154
|
# File 'lib/cocoapods/command/inter_process_communication.rb', line 150
def listen
while repl_command = STDIN.gets
execute_repl_command(repl_command)
end
end
|
#print_version ⇒ Object
141
142
143
|
# File 'lib/cocoapods/command/inter_process_communication.rb', line 141
def print_version
output_pipe.puts "version: '#{Pod::VERSION}'"
end
|
#run ⇒ Object
135
136
137
138
139
|
# File 'lib/cocoapods/command/inter_process_communication.rb', line 135
def run
print_version
signal_end_of_output
listen
end
|
#signal_end_of_output ⇒ Object
145
146
147
148
|
# File 'lib/cocoapods/command/inter_process_communication.rb', line 145
def signal_end_of_output
output_pipe.puts(END_OF_OUTPUT_SIGNAL)
STDOUT.flush
end
|