Class: Dockistrano::CommandLine
- Inherits:
-
Object
- Object
- Dockistrano::CommandLine
- Defined in:
- lib/dockistrano/command_line.rb
Class Method Summary collapse
- .command_with_interaction(command) ⇒ Object
- .command_with_result(command) ⇒ Object
- .command_with_stream(command) ⇒ Object
- .debug(command) ⇒ Object
Class Method Details
.command_with_interaction(command) ⇒ Object
18 19 20 21 |
# File 'lib/dockistrano/command_line.rb', line 18 def self.command_with_interaction(command) debug(command) Kernel.exec(command) end |
.command_with_result(command) ⇒ Object
5 6 7 8 |
# File 'lib/dockistrano/command_line.rb', line 5 def self.command_with_result(command) debug(command) `#{command}` end |
.command_with_stream(command) ⇒ Object
10 11 12 13 14 15 16 |
# File 'lib/dockistrano/command_line.rb', line 10 def self.command_with_stream(command) debug(command) begin Kernel.system(command) rescue Interrupt end end |
.debug(command) ⇒ Object
23 24 25 |
# File 'lib/dockistrano/command_line.rb', line 23 def self.debug(command) puts "$ #{command}" if false end |