Class: Spud::Shell
- Inherits:
-
String
- Object
- String
- Spud::Shell
- Defined in:
- lib/shell.rb
Instance Attribute Summary collapse
-
#cmd ⇒ Object
readonly
Returns the value of attribute cmd.
-
#status ⇒ Object
readonly
Returns the value of attribute status.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(output, status) ⇒ Shell
constructor
A new instance of Shell.
Constructor Details
#initialize(output, status) ⇒ Shell
10 11 12 13 |
# File 'lib/shell.rb', line 10 def initialize(output, status) super(output) @status = status end |
Instance Attribute Details
#cmd ⇒ Object (readonly)
Returns the value of attribute cmd.
3 4 5 |
# File 'lib/shell.rb', line 3 def cmd @cmd end |
#status ⇒ Object (readonly)
Returns the value of attribute status.
4 5 6 |
# File 'lib/shell.rb', line 4 def status @status end |
Class Method Details
.cmd(cmd) ⇒ Object
6 7 8 |
# File 'lib/shell.rb', line 6 def self.cmd(cmd) new( `#{cmd}`, $?) end |