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