class Warp::Dir::App::Response::Type
Use Case exit code stream
Public Instance Methods
print(msg)
click to toggle source
# File lib/warp/dir/app/response.rb, line 15 def print(msg) under_shell = ::Warp::Dir.eval_context? if msg == ' ' under_shell ? stream.printf(%Q{printf '\\n'; }) : stream.printf("\n") else msg.split("\n").each do |line| under_shell ? stream.printf(%Q{printf -- '#{line.gsub(/['`]/, '\"')}\\n';}) : stream.printf("#{line}\n") end end end
to_s()
click to toggle source
# File lib/warp/dir/app/response.rb, line 26 def to_s "code:#{exit_code}, stream:#{stream == $stdout ? "STDOUT" : "STDERR"}" end