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
coral_core-0.2.5 spec/coral_test_kernel.rb
coral_core-0.2.4 spec/coral_test_kernel.rb
coral_core-0.2.3 spec/coral_test_kernel.rb
coral_vagrant-0.2.0 spec/coral_test_kernel.rb
coral_core-0.2.2 spec/coral_test_kernel.rb
coral_core-0.2.0 spec/coral_test_kernel.rb
coral_vagrant-0.1.5 spec/coral_test_kernel.rb
coral_core-0.1.10 spec/coral_test_kernel.rb
coral_core-0.1.9 spec/coral_test_kernel.rb
coral_cloud-0.1.3 spec/coral_test_kernel.rb
coral_core-0.1.8 spec/coral_test_kernel.rb
coral_plan-0.1.3 spec/coral_test_kernel.rb
coral_core-0.1.7 spec/coral_test_kernel.rb
coral_vagrant-0.1.4 spec/coral_test_kernel.rb
coral_core-0.1.6 spec/coral_test_kernel.rb
coral_vagrant-0.1.3 spec/coral_test_kernel.rb
coral_core-0.1.5 spec/coral_test_kernel.rb
coral_vagrant-0.1.2 spec/coral_test_kernel.rb
coral_plan-0.1.2 spec/coral_test_kernel.rb
coral_cloud-0.1.2 spec/coral_test_kernel.rb