Sha256: 7ae6be2546dff32c17a6e16067cd6cf838d2a86bd8c69f2f5c690d49648ac72c
Contents?: true
Size: 335 Bytes
Versions: 7
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}." item.destroy end
Version data entries
7 entries across 7 versions & 1 rubygems