Sha256: e9cb1c3d2d8dc66e5d5bbafe5c4173378dd1076ef187f7cd4085514e9e0c1761

Contents?: true

Size: 393 Bytes

Versions: 1

Compression:

Stored size: 393 Bytes

Contents

module TestRocket
  module Out; attr_accessor :out; end; extend Out
  
  def _test(a, b)
    send((call rescue()) ? a : b)
  end

  def +@; r = _test :_pass, :_fail; (TestRocket.out || $>).puts r; r end
  def -@; r = _test :_fail, :_pass; (TestRocket.out || $>).puts r; r end

  def _pass; '  OK'; end
  def _fail; "FAIL @ #{source_location.join(':')}"; end
end

Proc.send :include, TestRocket

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
testrocket-0.0.1 lib/testrocket.rb