lib/gamefic-standard/edible.rb in gamefic-standard-2.1.0 vs lib/gamefic-standard/edible.rb in gamefic-standard-2.2.0
- old
+ new
@@ -1,23 +1,23 @@
-# @gamefic.script standard/edible
-
-module Edibility
- attr_writer :edible
- def edible?
- @edible ||= false
- end
-end
-
-class Thing
- include Edibility
-end
-
-Gamefic.script do
- respond :eat, Use.available do |actor, item|
- actor.tell "You can't eat #{the item}."
- end
-
- respond :eat, Use.available(:edible?) do |actor, item|
- actor.tell "You eat #{the item}."
- destroy item
- end
-end
+# @gamefic.script standard/edible
+
+module Edibility
+ attr_writer :edible
+ def edible?
+ @edible ||= false
+ end
+end
+
+class Thing
+ include Edibility
+end
+
+Gamefic.script do
+ respond :eat, Use.available do |actor, item|
+ actor.tell "You can't eat #{the item}."
+ end
+
+ respond :eat, Use.available(:edible?) do |actor, item|
+ actor.tell "You eat #{the item}."
+ destroy item
+ end
+end