Class: Orchestration::Terminal
- Inherits:
-
Object
- Object
- Orchestration::Terminal
- Defined in:
- lib/orchestration/terminal.rb
Instance Method Summary collapse
Instance Method Details
#read(message) ⇒ Object
24 25 26 27 |
# File 'lib/orchestration/terminal.rb', line 24 def read() write(:input, + ' ', nil, false) STDIN.gets.chomp end |
#write(desc, message, color_name = nil, newline = true) ⇒ Object
19 20 21 22 |
# File 'lib/orchestration/terminal.rb', line 19 def write(desc, , color_name = nil, newline = true) output = newline ? "#{}\n" : .to_s STDOUT.print colorize(desc, output, color_name) end |