Sha256: a1e7a50a9cad5085413d67ef820efb36f7576b5345120ccbbd8f4611208420d7
Contents?: true
Size: 335 Bytes
Versions: 2
Compression:
Stored size: 335 Bytes
Contents
module Edibility attr_writer :edible def edible? @edible ||= false end end class Gamefic::Entity include Edibility end respond :eat, Use.reachable do |actor, item| actor.tell "You can't eat #{the item}." end respond :eat, Use.reachable(:edible?) do |actor, item| actor.tell "You eat #{the item}." destroy item end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
gamefic-sdk-1.6.0 | scripts/edible.plot.rb |
gamefic-sdk-1.5.0 | scripts/edible.plot.rb |