Editing Code Tutorial

Faraday
Sun, 12 Aug 2018 23:44:02 +0000

Ah… it’s module AresMUSH (not AresMush).

All of the common utilities (including CommandHandler, the Character class, and more) are in a “module” - which is basically Ruby’s way of organizing code. It helps with name collisions, so AresMUSH::Event doesn’t conflict with some other code module that also wants an Event class.

Because your code is in the AresMush module instead of the AresMUSH module, it doesn’t have access to any of that.

But no, spacing doesn’t matter in Ruby. (It does in Python, btw, if you ever dabble in Evennia code.) Though spacing can help you identify issues with your ‘end’ markers being in the wrong place, which is a common problem. Most code editors have a built-in command to re-indent the file.