Sha256: 05c414fc3d3827d0eb2a6374e18dcd7f0f4a8b9d39f0d56adc1a4c536fb2fe94

Contents?: true

Size: 494 Bytes

Versions: 1

Compression:

Stored size: 494 Bytes

Contents

module TestRocketLauncher
  def fire(d,&b)
    !->{ d.to_s }
    b.call
    r = "  /FIRED"
    (TestRocket.out || $>).puts r; r
  end
  def launcher(d,&b)
    $targets = 0; $hits = 0; $lost = 0
    (TestRocket.out || $>).puts "LAUNCHING '#{d}'"
    $launched = true
    b.call
    $launched = false
    r = "HIT #{$hits} of #{$targets} TARGET(S) AND MISSED #{$targets-$lost-$hits}, LOST #{$lost} ROCKET(S)"
    (TestRocket.out || $>).puts r; r
  end
end
self.send :include, TestRocketLauncher

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
aki-testrocket-0.0.3 lib/testrocket/launcher.rb