Skip to content
floere edited this page Sep 14, 2010 · 1 revision

Shot is about bullets, guns, rockets, live chicken. It is about things that are shot from a Shooter.

Including Shot

The Shot trait can be applied as usual:

class Bullet < Thing
  it_is_a Shot

or

class Bullet < Thing
  it_is_a Shot do
    # …
  end

Properties

Shot has no specific property.

Methods

Normally you don’t need any of these methods. Just use the shot together with a Shooter.

Shot installs five methods: shoot_from, velocity, velocity=, originator, and originator=.

it mainly installs the shoot_from <shooter> method so the shot can be used together with a Shooter.

The originator accessors can be used to get or set the originator.