Modular scripts

Not sure how to really phrase the question so I will explain what I
am doing:

I need to allow users to perform some “system” commands, that is,
Rails will execute these commands. In order to parse the return data
and display it in a certain way, I need to store each of the allowed
“commands” in its own script. Where should these scripts go? Should
it be a module? Should it open the directory and read in all module
files? How would I get the class name? etc.

I’ve never done this before so I’m just needing some direction on this.

Thanks.