Sha256: 8a913a826db68f9a862e8198c4576b3da513c24831e13cb90168746ac8659a73

Contents?: true

Size: 591 Bytes

Versions: 1

Compression:

Stored size: 591 Bytes

Contents

# A test class that we can make deliveries with and easily check results.
class Explosive
  include Candygram::Delivery
  CANDYGRAM_MAX = 5
  
  attr_accessor :weight
  
  def kaboom
    "An earth-shattering kaboom!"
  end
  
  def repeated_kaboom(planet, repeat)
    "A #{planet}-shattering kaboom #{repeat} times!"
  end
  
  def object_kaboom(planet, repeat, object)
    "A #{planet}-shattering kaboom #{repeat} times using a #{object.class.name}!"
  end
  
  # To test that locking is performed properly
  def slow_kaboom
    sleep(5)
    "Waited 5 seconds...  NOW we kaboom."
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
candygram-0.1.0 spec/support/explosive.rb