Class: Mattock::ShellEscaped
- Inherits:
-
CommandLine
- Object
- CommandLine
- Mattock::ShellEscaped
- Defined in:
- lib/mattock/command-line.rb
Instance Attribute Summary
Attributes inherited from CommandLine
Instance Method Summary (collapse)
- - (Object) command
-
- (ShellEscaped) initialize(cmd)
constructor
A new instance of ShellEscaped.
- - (Object) name
Methods inherited from CommandLine
#copy_stream_to, emit_recording, execute, #must_succeed!, original_execute, #redirect_from, #redirect_stderr, #redirect_stdin, #redirect_stdout, #redirect_to, #run, #succeeds?, #verbose
Constructor Details
- (ShellEscaped) initialize(cmd)
A new instance of ShellEscaped
114 115 116 |
# File 'lib/mattock/command-line.rb', line 114 def initialize(cmd) @escaped = cmd end |
Instance Method Details
- (Object) command
118 119 120 |
# File 'lib/mattock/command-line.rb', line 118 def command "'" + @escaped.command.gsub(/'/,"\'") + "'" end |
- (Object) name
122 123 124 |
# File 'lib/mattock/command-line.rb', line 122 def name @name || @escaped.name end |