Sha256: 3f1247d314c469e3f27fbddec352af522e0639a8ebe243db8dbb922b2949c7ea
Contents?: true
Size: 415 Bytes
Versions: 9
Compression:
Stored size: 415 Bytes
Contents
respond :inventory do |actor| if actor.children.length > 0 carried = actor.children.that_are_not(:attached?) worn = actor.children.that_are(:attached?) if carried.length > 0 actor.tell "You are carrying #{carried.join_and}." end if worn.length > 0 actor.tell "You are wearing #{worn.join_and}." end else actor.tell "You aren't carrying anything." end end
Version data entries
9 entries across 9 versions & 1 rubygems