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



10
11
12
13
# File 'lib/shell.rb', line 10

def initialize(output, status)
  super(output)
  @status = status
end

Instance Attribute Details

#cmdObject (readonly)

Returns the value of attribute cmd.



3
4
5
# File 'lib/shell.rb', line 3

def cmd
  @cmd
end

#statusObject (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