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