Sha256: ee46582b319f285300e0caf47cf20c4d1003a7cc18f537aebf501a7c5c5b3c62

Contents?: true

Size: 348 Bytes

Versions: 102

Compression:

Stored size: 348 Bytes

Contents

module Kernel

  #-----------------------------------------------------------------------------
  # Utilities

  def capture
    out     = StringIO.new
    $stdout = out
    
    error   = StringIO.new
    $stderr = error
    
    # Go do stuff!
    yield    
    return out, error
    
  ensure
    $stdout = STDOUT
    $stderr = STDERR
  end
end

Version data entries

102 entries across 102 versions & 6 rubygems

Version Path
corl-0.4.19 spec/corl_test_kernel.rb
nucleon-0.1.15 spec/coral_test_kernel.rb
corl-0.4.18 spec/corl_test_kernel.rb
nucleon-0.1.14 spec/coral_test_kernel.rb
corl-0.4.17 spec/corl_test_kernel.rb
nucleon-0.1.13 spec/coral_test_kernel.rb
corl-0.4.16 spec/corl_test_kernel.rb
nucleon-0.1.12 spec/coral_test_kernel.rb
nucleon-0.1.11 spec/coral_test_kernel.rb
nucleon-0.1.10 spec/coral_test_kernel.rb
corl-0.4.15 spec/corl_test_kernel.rb
corl-0.4.14 spec/corl_test_kernel.rb
nucleon-0.1.9 spec/coral_test_kernel.rb
corl-0.4.13 spec/corl_test_kernel.rb
corl-0.4.12 spec/corl_test_kernel.rb
corl-0.4.11 spec/corl_test_kernel.rb
nucleon-0.1.8 spec/coral_test_kernel.rb
corl-0.4.10 spec/corl_test_kernel.rb
corl-0.4.9 spec/corl_test_kernel.rb
corl-0.4.8 spec/corl_test_kernel.rb