Class: Remoting::Shell
- Inherits:
-
Thor::Shell::Color
- Object
- Thor::Shell::Color
- Remoting::Shell
- Defined in:
- lib/remoting/shell.rb
Instance Method Summary collapse
- #ask_password(*args) ⇒ Object
- #bold(message) ⇒ Object
- #continue?(message) ⇒ Boolean
- #error(message) ⇒ Object
- #no?(message) ⇒ Boolean
- #success(message) ⇒ Object
Instance Method Details
#ask_password(*args) ⇒ Object
5 6 7 8 9 10 11 |
# File 'lib/remoting/shell.rb', line 5 def ask_password(*args) system "stty -echo" res = ask(*args) system "stty echo" puts("\n") res end |
#bold(message) ⇒ Object
21 22 23 |
# File 'lib/remoting/shell.rb', line 21 def bold() say(, BOLD) end |
#continue?(message) ⇒ Boolean
13 14 15 16 17 18 19 |
# File 'lib/remoting/shell.rb', line 13 def continue?() res = yes?( << " (y/yes)") if !res say("Cancelled", BLUE) end res end |
#error(message) ⇒ Object
33 34 35 |
# File 'lib/remoting/shell.rb', line 33 def error() say(, RED) end |
#no?(message) ⇒ Boolean
25 26 27 |
# File 'lib/remoting/shell.rb', line 25 def no?() super( << " (n/no)") end |
#success(message) ⇒ Object
29 30 31 |
# File 'lib/remoting/shell.rb', line 29 def success() say(, GREEN) end |