Class: Dr::ShellCmd
Instance Attribute Summary collapse
-
#err ⇒ Object
readonly
Returns the value of attribute err.
-
#out ⇒ Object
readonly
Returns the value of attribute out.
-
#status ⇒ Object
readonly
Returns the value of attribute status.
Instance Method Summary collapse
-
#initialize(cmd, opts = {}) ⇒ ShellCmd
constructor
A new instance of ShellCmd.
Methods included from Logger
Constructor Details
#initialize(cmd, opts = {}) ⇒ ShellCmd
Returns a new instance of ShellCmd.
12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 |
# File 'lib/dr/shellcmd.rb', line 12 def initialize(cmd, opts={}) @out = "" @show_out = false @raise_on_error = true @tag = "shell" @expect = 0 opts.each do |k, v| self.instance_variable_set("@#{k.to_s}", v) end @cmd = cmd @status = nil run end |
Instance Attribute Details
#err ⇒ Object (readonly)
Returns the value of attribute err.
8 9 10 |
# File 'lib/dr/shellcmd.rb', line 8 def err @err end |
#out ⇒ Object (readonly)
Returns the value of attribute out.
8 9 10 |
# File 'lib/dr/shellcmd.rb', line 8 def out @out end |
#status ⇒ Object (readonly)
Returns the value of attribute status.
8 9 10 |
# File 'lib/dr/shellcmd.rb', line 8 def status @status end |