Throughout these tutorials, we’ve been using the tinker
command. There’s another way to execute code on-the-fly in Ares, and that’s the ruby
command. This lets you execute single-line ruby code snippets from the MU client. You can’t do error checking or complex logic in the ruby command, but it’s handy for quick tasks.
Type this into your MU client:
ruby "Your name is #{enactor.name}"
A couple notes:
enactor
the same way the tinker command does.client.emit
the way you did in the tinker commands.For example:
ruby Character.named("Faraday")
Will output something like:
#<AresMUSH::Character:0x00007fa373c81e78>
This is because you can’t emit an entire character object.
This would work just fine though, because ‘name’ is a string:
ruby Character.named("Faraday").name