Class: Oink::Instrumentation::SystemCall

Inherits:
Object
  • Object
show all
Defined in:
lib/oink/instrumentation/memory_snapshot.rb

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(cmd) ⇒ SystemCall

Returns a new instance of SystemCall.



98
99
100
# File 'lib/oink/instrumentation/memory_snapshot.rb', line 98

def initialize(cmd)
  @stdout = `#{cmd}`
end

Class Method Details

.execute(cmd) ⇒ Object



102
103
104
# File 'lib/oink/instrumentation/memory_snapshot.rb', line 102

def self.execute(cmd)
  new(cmd)
end

Instance Method Details

#stdoutObject



106
107
108
# File 'lib/oink/instrumentation/memory_snapshot.rb', line 106

def stdout
  @stdout
end

#success?Boolean

Returns:

  • (Boolean)


110
111
112
# File 'lib/oink/instrumentation/memory_snapshot.rb', line 110

def success?
  $?.success?
end