class R2do::UI
Public Class Methods
input(message)
click to toggle source
Accepts user input after displaying a message
@return [String] the value the user inserted
# File lib/r2do/ui.rb, line 47 def self.input(message) print "#{message} " $stdout.flush value = $stdin.gets.chomp end
new_line()
click to toggle source
Adds a new empty line on the display
@return [void]
# File lib/r2do/ui.rb, line 40 def self.new_line() puts end
rescue(exception)
click to toggle source
Displays a status message to the user
@param [String] message the message to display to the user @return [void]
# File lib/r2do/ui.rb, line 33 def self.rescue(exception) puts "abort: #{exception.message}" end
status(message)
click to toggle source
Displays a status message to the user
@param [String] message the message to display to the user @return [void]
# File lib/r2do/ui.rb, line 25 def self.status(message) puts message end