Top Level Namespace
Defined Under Namespace
Modules: AmqpSpecHelper, Daemon, DaemonHelper, DebugRegistry, DebugSupervisors, EMSpecHelper, Onapp, OnappEngineDiagnostics, SupervisorCommandsDiagnostics
Instance Method Summary
(collapse)
Instance Method Details
- (Object) ask(msg, default = nil)
6
7
8
9
10
11
12
13
14
15
16
17
18
|
# File 'lib/onapp/engine/utils/diagnostics.rb', line 6
def ask(msg, default = nil)
msg = "#{msg} (default: #{default.inspect})" if default
print "#{msg} -> "
answer = $stdin.gets
return answer if answer.nil?
answer.strip!
if answer.empty? && default
default
else
answer
end
end
|
- (Object) die(msg)
1
2
3
4
|
# File 'lib/onapp/engine/utils/diagnostics.rb', line 1
def die(msg)
puts msg
exit 1
end
|