Sha256: 900c9ba50e7f9de7614f18fce49565d26a8070f07aba5d401aff22f986568e01

Contents?: true

Size: 510 Bytes

Versions: 27

Compression:

Stored size: 510 Bytes

Contents

require 'ostruct'

module Tryouts
  
  #    tryout :name do
  #       ...
  #    end
  def tryout(name, &b)
    puts '-'*50
    puts "Running#{@poop}: #{name}"
    begin
      b.call
      sleep 0.1
    rescue Interrupt
    rescue => ex
      STDERR.puts "Tryout error: #{ex.message}"
    end  
      puts $/*2
  end
  
  # Ignore everything
  def xtryout(name, &b)
  end
  
  # Is this wacky syntax useful for anything?
  #    t2 :set .
  #       run = "poop"
  def t2(*args)
    OpenStruct.new
  end
  
end

Version data entries

27 entries across 27 versions & 2 rubygems

Version Path
solutious-rudy-0.5.1 lib/tryouts.rb
solutious-rudy-0.6.0 lib/tryouts.rb
solutious-rudy-0.6.1 lib/tryouts.rb
solutious-rudy-0.6.2 lib/tryouts.rb
solutious-rudy-0.6.3 lib/tryouts.rb
solutious-rudy-0.6.4 lib/tryouts.rb
solutious-rudy-0.6.5 lib/tryouts.rb
solutious-rudy-0.6.6 lib/tryouts.rb
solutious-rudy-0.6.7 lib/tryouts.rb
solutious-rudy-0.6.8 lib/tryouts.rb
solutious-rudy-0.7.0 lib/tryouts.rb
solutious-rudy-0.7.1 lib/tryouts.rb
solutious-rudy-0.7.2 lib/tryouts.rb
solutious-rudy-0.7.3 lib/tryouts.rb
solutious-rudy-0.9.0 tryouts/misc/tryouts.rb
rudy-0.6.0 lib/tryouts.rb
rudy-0.6.1 lib/tryouts.rb
rudy-0.6.2 lib/tryouts.rb
rudy-0.6.5 lib/tryouts.rb
rudy-0.6.3 lib/tryouts.rb