Class: Spud::Shell

Inherits:
String
  • Object
show all
Defined in:
lib/shell.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

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

#statusObject

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